Commit e0d4a290 authored by Joe Conway's avatar Joe Conway

Fix pg_dump output of policies.

pg_dump neglected to wrap parenthesis around USING and WITH CHECK
expressions -- fixed. Reported by Noah Misch.
parent 3d5cb31c
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment