aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_dump/pg_backup_archiver.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c
index 8892b177905..651d2a4b8e1 100644
--- a/src/bin/pg_dump/pg_backup_archiver.c
+++ b/src/bin/pg_dump/pg_backup_archiver.c
@@ -992,10 +992,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));
}
@@ -1020,10 +1022,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));
}