Commit c3cc844f authored by Joe Conway's avatar Joe Conway

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.
parent dd85acf0
......@@ -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);
......
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