Skip to content

Commit c3cc844

Browse files
committed
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.
1 parent dd85acf commit c3cc844

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/psql/describe.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2083,11 +2083,11 @@ describeOneTableDetails(const char *schemaname,
20832083
}
20842084

20852085
if (!PQgetisnull(result, i, 2))
2086-
appendPQExpBuffer(&buf, "\n USING %s",
2086+
appendPQExpBuffer(&buf, "\n USING (%s)",
20872087
PQgetvalue(result, i, 2));
20882088

20892089
if (!PQgetisnull(result, i, 3))
2090-
appendPQExpBuffer(&buf, "\n WITH CHECK %s",
2090+
appendPQExpBuffer(&buf, "\n WITH CHECK (%s)",
20912091
PQgetvalue(result, i, 3));
20922092

20932093
printTableAddFooter(&cont, buf.data);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy