Skip to content

Commit 510aad3

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 5d179a2 commit 510aad3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/pg_dump/pg_dump.c

Lines changed: 2 additions & 2 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy