Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf0bfc02

Browse files
committed
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 inany PG release we would recognize as such. Since it forces an additionalnetwork round trip to the backend, getting rid of it should provide somesmall performance improvement for large-object-using clients.
1 parent56aa84a commitf0bfc02

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

‎src/interfaces/libpq/fe-lobj.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-lobj.c,v 1.54 2005/10/15 02:49:48 momjian Exp $
11+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-lobj.c,v 1.55 2006/03/02 21:56:14 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -76,11 +76,6 @@ lo_open(PGconn *conn, Oid lobjId, int mode)
7676
if (PQresultStatus(res)==PGRES_COMMAND_OK)
7777
{
7878
PQclear(res);
79-
80-
/* have to do this to reset offset in shared fd cache */
81-
/* but only if fd is valid */
82-
if (fd >=0&&lo_lseek(conn,fd,0L,SEEK_SET)<0)
83-
return-1;
8479
returnfd;
8580
}
8681
else

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp