mirror of
https://github.com/postgres/postgres.git
synced 2025-07-20 05:03:10 +03:00
Additional fixes for large object access control.
Use pg_largeobject_metadata.oid instead of pg_largeobject.loid to enumerate existing large objects in pg_dump, pg_restore, and contrib modules.
This commit is contained in:
@ -15,7 +15,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.176 2009/10/05 19:24:45 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.177 2009/12/14 00:39:10 itagaki Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -914,8 +914,7 @@ StartRestoreBlob(ArchiveHandle *AH, Oid oid, bool drop)
|
||||
ahlog(AH, 2, "restoring large object with OID %u\n", oid);
|
||||
|
||||
if (drop)
|
||||
ahprintf(AH, "SELECT CASE WHEN EXISTS(SELECT 1 FROM pg_catalog.pg_largeobject WHERE loid = '%u') THEN pg_catalog.lo_unlink('%u') END;\n",
|
||||
oid, oid);
|
||||
DropBlobIfExists(AH, oid);
|
||||
|
||||
if (AH->connection)
|
||||
{
|
||||
|
Reference in New Issue
Block a user