diff options
author | Joe Conway <mail@joeconway.com> | 2015-08-03 09:07:47 -0700 |
---|---|---|
committer | Joe Conway <mail@joeconway.com> | 2015-08-03 09:07:47 -0700 |
commit | c3cc844feb4a52fc57f53d129f33782d55f29340 (patch) | |
tree | 351d18269210a991a9c67ae0ec969d24b0611481 | |
parent | dd85acf0c49ee6ea86b2ea0d4ff851b89c1f355a (diff) | |
download | postgresql-c3cc844feb4a52fc57f53d129f33782d55f29340.tar.gz postgresql-c3cc844feb4a52fc57f53d129f33782d55f29340.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.c | 4 |
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); |