diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c index 1fbe7b27dc9..2ae18fbbf14 100644 --- a/src/bin/pg_dump/pg_backup_archiver.c +++ b/src/bin/pg_dump/pg_backup_archiver.c @@ -974,10 +974,12 @@ _disableTriggersIfNecessary(ArchiveHandle *AH, TocEntry *te) _becomeUser(AH, ropt->superuser); /* - * Disable them. + * Disable them. Assume that the table name should be schema-qualified + * (we can't look at PQserverVersion, since we might not have any + * connection; and anyway we don't promise our output will load pre-7.3). */ ahprintf(AH, "ALTER TABLE %s DISABLE TRIGGER ALL;\n\n", - fmtQualifiedId(PQserverVersion(AH->connection), + fmtQualifiedId(70300, te->namespace, te->tag)); } @@ -1002,10 +1004,10 @@ _enableTriggersIfNecessary(ArchiveHandle *AH, TocEntry *te) _becomeUser(AH, ropt->superuser); /* - * Enable them. + * Enable them. As above, force schema qualification. */ ahprintf(AH, "ALTER TABLE %s ENABLE TRIGGER ALL;\n\n", - fmtQualifiedId(PQserverVersion(AH->connection), + fmtQualifiedId(70300, te->namespace, te->tag)); }