Skip to content

Commit 584100e

Browse files
committed
BABEL: Avoid adding \unrestrict in restore script for Babelfish
1 parent bb2824a commit 584100e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/bin/pg_dump/pg_dumpall.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -646,10 +646,11 @@ main(int argc, char *argv[])
646646
}
647647

648648
/*
649-
* Exit restricted mode just before dumping the databases. pg_dump will
649+
* Exit restricted mode just before dumping the databases except Babelfish. pg_dump will
650650
* handle entering restricted mode again as appropriate.
651651
*/
652-
fprintf(OPF, "\\unrestrict %s\n\n", restrict_key);
652+
if (!isBabelfishDatabase(conn))
653+
fprintf(OPF, "\\unrestrict %s\n\n", restrict_key);
653654

654655
if (!globals_only && !roles_only && !tablespaces_only)
655656
dumpDatabases(conn);

0 commit comments

Comments
 (0)