diff options
-rw-r--r-- | src/bin/pg_dump/pg_dump.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index a0eb8b41cd6..14e1aec52e5 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -12,7 +12,7 @@ * by PostgreSQL * * IDENTIFICATION - * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.482.2.1 2009/01/18 20:44:53 tgl Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.482.2.2 2009/04/01 18:54:33 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1758,7 +1758,13 @@ dumpBlobComments(Archive *AH, void *arg) selectSourceSchema("pg_catalog"); /* Cursor to get all BLOB comments */ - if (AH->remoteVersion >= 70200) + if (AH->remoteVersion >= 70300) + blobQry = "DECLARE blobcmt CURSOR FOR SELECT loid, " + "obj_description(loid, 'pg_largeobject') " + "FROM (SELECT DISTINCT loid FROM " + "pg_description d JOIN pg_largeobject l ON (objoid = loid) " + "WHERE classoid = 'pg_largeobject'::regclass) ss"; + else if (AH->remoteVersion >= 70200) blobQry = "DECLARE blobcmt CURSOR FOR SELECT loid, obj_description(loid, 'pg_largeobject') FROM (SELECT DISTINCT loid FROM pg_largeobject) ss"; else if (AH->remoteVersion >= 70100) blobQry = "DECLARE blobcmt CURSOR FOR SELECT loid, obj_description(loid) FROM (SELECT DISTINCT loid FROM pg_largeobject) ss"; |