mirror of
https://github.com/postgres/postgres.git
synced 2025-05-05 09:19:17 +03:00
Fix pg_dump output of policies.
pg_dump neglected to wrap parenthesis around USING and WITH CHECK expressions -- fixed. Reported by Noah Misch.
This commit is contained in:
parent
5d179a28fb
commit
510aad31ea
@ -3012,10 +3012,10 @@ dumpPolicy(Archive *fout, DumpOptions *dopt, PolicyInfo *polinfo)
|
|||||||
appendPQExpBuffer(query, " TO %s", polinfo->polroles);
|
appendPQExpBuffer(query, " TO %s", polinfo->polroles);
|
||||||
|
|
||||||
if (polinfo->polqual != NULL)
|
if (polinfo->polqual != NULL)
|
||||||
appendPQExpBuffer(query, " USING %s", polinfo->polqual);
|
appendPQExpBuffer(query, " USING (%s)", polinfo->polqual);
|
||||||
|
|
||||||
if (polinfo->polwithcheck != NULL)
|
if (polinfo->polwithcheck != NULL)
|
||||||
appendPQExpBuffer(query, " WITH CHECK %s", polinfo->polwithcheck);
|
appendPQExpBuffer(query, " WITH CHECK (%s)", polinfo->polwithcheck);
|
||||||
|
|
||||||
appendPQExpBuffer(query, ";\n");
|
appendPQExpBuffer(query, ";\n");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user