diff options
author | Joe Conway <mail@joeconway.com> | 2015-07-27 20:24:27 -0700 |
---|---|---|
committer | Joe Conway <mail@joeconway.com> | 2015-07-27 20:24:27 -0700 |
commit | 510aad31eaf2129d28ae3dbfc58f98775192ee94 (patch) | |
tree | 73c0f00fcac0e5e3a07660f3d8c2b5ea6810d210 /src | |
parent | 5d179a28fb4c819f3812c40fa7e626b1d3081982 (diff) | |
download | postgresql-510aad31eaf2129d28ae3dbfc58f98775192ee94.tar.gz postgresql-510aad31eaf2129d28ae3dbfc58f98775192ee94.zip |
Fix pg_dump output of policies.
pg_dump neglected to wrap parenthesis around USING and WITH CHECK
expressions -- fixed. Reported by Noah Misch.
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pg_dump/pg_dump.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 0b5262a8a1a..ba1497fed49 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -3012,10 +3012,10 @@ dumpPolicy(Archive *fout, DumpOptions *dopt, PolicyInfo *polinfo) appendPQExpBuffer(query, " TO %s", polinfo->polroles); if (polinfo->polqual != NULL) - appendPQExpBuffer(query, " USING %s", polinfo->polqual); + appendPQExpBuffer(query, " USING (%s)", polinfo->polqual); if (polinfo->polwithcheck != NULL) - appendPQExpBuffer(query, " WITH CHECK %s", polinfo->polwithcheck); + appendPQExpBuffer(query, " WITH CHECK (%s)", polinfo->polwithcheck); appendPQExpBuffer(query, ";\n"); |