aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Naylor <john.naylor@postgresql.org>2023-04-05 14:16:19 +0700
committerJohn Naylor <john.naylor@postgresql.org>2023-04-05 14:22:55 +0700
commitf5d60b1ea2156ecd42c6ccd4284f715763abf8f8 (patch)
tree36f45e1e3286e32f429d2c86a7e3f341204dc28d
parentb135a94db7743ffbceabf62c87be2b8f32a91465 (diff)
downloadpostgresql-f5d60b1ea2156ecd42c6ccd4284f715763abf8f8.tar.gz
postgresql-f5d60b1ea2156ecd42c6ccd4284f715763abf8f8.zip
doc: Update error messages in RLS examples
Since 8b9e9644d, the messages for failed permissions checks report "table" where appropriate, rather than "relation". Backpatch to all supported branches
-rw-r--r--doc/src/sgml/ddl.sgml8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml
index 2eb1b7ae42c..9717d1596de 100644
--- a/doc/src/sgml/ddl.sgml
+++ b/doc/src/sgml/ddl.sgml
@@ -2569,7 +2569,7 @@ postgres=&gt; table passwd;
postgres=&gt; set role alice;
SET
postgres=&gt; table passwd;
-ERROR: permission denied for relation passwd
+ERROR: permission denied for table passwd
postgres=&gt; select user_name,real_name,home_phone,extra_info,home_dir,shell from passwd;
user_name | real_name | home_phone | extra_info | home_dir | shell
-----------+-----------+--------------+------------+-------------+-----------
@@ -2579,7 +2579,7 @@ postgres=&gt; select user_name,real_name,home_phone,extra_info,home_dir,shell fr
(3 rows)
postgres=&gt; update passwd set user_name = 'joe';
-ERROR: permission denied for relation passwd
+ERROR: permission denied for table passwd
-- Alice is allowed to change her own real_name, but no others
postgres=&gt; update passwd set real_name = 'Alice Doe';
UPDATE 1
@@ -2588,9 +2588,9 @@ UPDATE 0
postgres=&gt; update passwd set shell = '/bin/xx';
ERROR: new row violates WITH CHECK OPTION for "passwd"
postgres=&gt; delete from passwd;
-ERROR: permission denied for relation passwd
+ERROR: permission denied for table passwd
postgres=&gt; insert into passwd (user_name) values ('xxx');
-ERROR: permission denied for relation passwd
+ERROR: permission denied for table passwd
-- Alice can change her own password; RLS silently prevents updating other rows
postgres=&gt; update passwd set pwhash = 'abc';
UPDATE 1