Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e0d4a29

Browse files
committed
Fix pg_dump output of policies.
pg_dump neglected to wrap parenthesis around USING and WITH CHECK expressions -- fixed. Reported by Noah Misch.
1 parent 3d5cb31 commit e0d4a29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/pg_dump/pg_dump.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -3012,10 +3012,10 @@ dumpPolicy(Archive *fout, DumpOptions *dopt, PolicyInfo *polinfo)
30123012
appendPQExpBuffer(query, " TO %s", polinfo->polroles);
30133013

30143014
if (polinfo->polqual != NULL)
3015-
appendPQExpBuffer(query, " USING %s", polinfo->polqual);
3015+
appendPQExpBuffer(query, " USING (%s)", polinfo->polqual);
30163016

30173017
if (polinfo->polwithcheck != NULL)
3018-
appendPQExpBuffer(query, " WITH CHECK %s", polinfo->polwithcheck);
3018+
appendPQExpBuffer(query, " WITH CHECK (%s)", polinfo->polwithcheck);
30193019

30203020
appendPQExpBuffer(query, ";\n");
30213021

0 commit comments

Comments
 (0)