git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3d5cb31)
Fix pg_dump output of policies.
2015年7月28日 03:24:18 +0000 (20:24 -0700)
2015年7月28日 03:24:18 +0000 (20:24 -0700)
pg_dump neglected to wrap parenthesis around USING and WITH CHECK
expressions -- fixed. Reported by Noah Misch.


diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index b24b8bd7c91dd5c5af2df3b7ca8b760ac581895e..00b86766336715f0a21e66110512f265ab1b5c3a 100644 (file)
--- 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");
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /