aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Conway <mail@joeconway.com>2015-08-03 09:08:01 -0700
committerJoe Conway <mail@joeconway.com>2015-08-03 09:08:01 -0700
commit8f45a58d394bbe83c54306ba769ac02c9239c259 (patch)
tree107f169f1ea8e1e0c902dd385a600b31d231056c
parent46e9019bbce96c309d27d4b164bf9a2d0d8292eb (diff)
downloadpostgresql-8f45a58d394bbe83c54306ba769ac02c9239c259.tar.gz
postgresql-8f45a58d394bbe83c54306ba769ac02c9239c259.zip
Fix psql \d output of policies.
psql neglected to wrap parenthesis around USING and WITH CHECK expressions -- fixed. Back-patched to 9.5 where RLS policies were introduced.
-rw-r--r--src/bin/psql/describe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index f63c7e90d3c..898f8b39cdc 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -2083,11 +2083,11 @@ describeOneTableDetails(const char *schemaname,
}
if (!PQgetisnull(result, i, 2))
- appendPQExpBuffer(&buf, "\n USING %s",
+ appendPQExpBuffer(&buf, "\n USING (%s)",
PQgetvalue(result, i, 2));
if (!PQgetisnull(result, i, 3))
- appendPQExpBuffer(&buf, "\n WITH CHECK %s",
+ appendPQExpBuffer(&buf, "\n WITH CHECK (%s)",
PQgetvalue(result, i, 3));
printTableAddFooter(&cont, buf.data);