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

Commitbfd17f9

Browse files
committed
Improve pg_dump's query for retrieving BLOB comments to be more efficient
when there are many blobs and not so many comments. Tamas Vincze
1 parent00b24e1 commitbfd17f9

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

‎src/bin/pg_dump/pg_dump.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*by PostgreSQL
1313
*
1414
* IDENTIFICATION
15-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.531 2009/03/26 22:26:07 petere Exp $
15+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.532 2009/04/01 18:54:27 tgl Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -1995,7 +1995,13 @@ dumpBlobComments(Archive *AH, void *arg)
19951995
selectSourceSchema("pg_catalog");
19961996

19971997
/* Cursor to get all BLOB comments */
1998-
if (AH->remoteVersion >=70200)
1998+
if (AH->remoteVersion >=70300)
1999+
blobQry="DECLARE blobcmt CURSOR FOR SELECT loid, "
2000+
"obj_description(loid, 'pg_largeobject') "
2001+
"FROM (SELECT DISTINCT loid FROM "
2002+
"pg_description d JOIN pg_largeobject l ON (objoid = loid) "
2003+
"WHERE classoid = 'pg_largeobject'::regclass) ss";
2004+
elseif (AH->remoteVersion >=70200)
19992005
blobQry="DECLARE blobcmt CURSOR FOR SELECT loid, "
20002006
"obj_description(loid, 'pg_largeobject') "
20012007
"FROM (SELECT DISTINCT loid FROM pg_largeobject) ss";

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp