Remove unnecessary lo_lseek call in lo_open. Apparently there was once
a need for it back in the neolithic era, but it's certainly dead code in any PG release we would recognize as such. Since it forces an additional network round trip to the backend, getting rid of it should provide some small performance improvement for large-object-using clients.
This commit is contained in:
parent
56aa84a69c
commit
f0bfc02001
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-lobj.c,v 1.54 2005/10/15 02:49:48 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-lobj.c,v 1.55 2006/03/02 21:56:14 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -76,11 +76,6 @@ lo_open(PGconn *conn, Oid lobjId, int mode)
|
||||
if (PQresultStatus(res) == PGRES_COMMAND_OK)
|
||||
{
|
||||
PQclear(res);
|
||||
|
||||
/* have to do this to reset offset in shared fd cache */
|
||||
/* but only if fd is valid */
|
||||
if (fd >= 0 && lo_lseek(conn, fd, 0L, SEEK_SET) < 0)
|
||||
return -1;
|
||||
return fd;
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user