From 42f66b27566798d9969791ec6d2acd399c41b60f Mon Sep 17 00:00:00 2001 From: Stephen Frost Date: Wed, 28 Jan 2015 22:16:24 -0500 Subject: [PATCH] Improve CREATE POLICY documentation The CREATE POLICY documention didn't sufficiently clarify what happens when a given command type (eg: ALL or UPDATE) accepts both USING and WITH CHECK clauses, but only the USING clause is defined. Add language to clarify that, in such a case, the USING clause will be used for both USING and WITH CHECK cases. Pointed out by Peter Geoghegan. --- doc/src/sgml/ref/create_policy.sgml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/doc/src/sgml/ref/create_policy.sgml b/doc/src/sgml/ref/create_policy.sgml index 8ef8556b51..18ab4a78f9 100644 --- a/doc/src/sgml/ref/create_policy.sgml +++ b/doc/src/sgml/ref/create_policy.sgml @@ -63,7 +63,11 @@ CREATE POLICY name ON @@ -204,8 +208,10 @@ CREATE POLICY name ON ALL WITH CHECK - (or USING, if no WITH CHECK expression is defined) expression, the - command will error. + expression, the entire command will be aborted. Note that if only a + USING clause is specified then that clause will be + used for both USING and + WITH CHECK cases. @@ -256,7 +262,10 @@ CREATE POLICY name ON INSERT policy). Any rows whose resulting values do not pass the WITH CHECK expression will cause an ERROR and the - entire command will be aborted. + entire command will be aborted. Note that if only a + USING clause is specified then that clause will be + used for both USING and + WITH CHECK cases.