Skip to content

Commit 72e7872

Browse files
committed
doc: Update error messages in RLS examples
Since 8b9e964, the messages for failed permissions checks report "table" where appropriate, rather than "relation". Backpatch to all supported branches
1 parent ba0e837 commit 72e7872

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/src/sgml/ddl.sgml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2457,7 +2457,7 @@ postgres=> table passwd;
24572457
postgres=> set role alice;
24582458
SET
24592459
postgres=> table passwd;
2460-
ERROR: permission denied for relation passwd
2460+
ERROR: permission denied for table passwd
24612461
postgres=> select user_name,real_name,home_phone,extra_info,home_dir,shell from passwd;
24622462
user_name | real_name | home_phone | extra_info | home_dir | shell
24632463
-----------+-----------+--------------+------------+-------------+-----------
@@ -2467,7 +2467,7 @@ postgres=> select user_name,real_name,home_phone,extra_info,home_dir,shell fr
24672467
(3 rows)
24682468

24692469
postgres=> update passwd set user_name = 'joe';
2470-
ERROR: permission denied for relation passwd
2470+
ERROR: permission denied for table passwd
24712471
-- Alice is allowed to change her own real_name, but no others
24722472
postgres=> update passwd set real_name = 'Alice Doe';
24732473
UPDATE 1
@@ -2476,9 +2476,9 @@ UPDATE 0
24762476
postgres=> update passwd set shell = '/bin/xx';
24772477
ERROR: new row violates WITH CHECK OPTION for "passwd"
24782478
postgres=> delete from passwd;
2479-
ERROR: permission denied for relation passwd
2479+
ERROR: permission denied for table passwd
24802480
postgres=> insert into passwd (user_name) values ('xxx');
2481-
ERROR: permission denied for relation passwd
2481+
ERROR: permission denied for table passwd
24822482
-- Alice can change her own password; RLS silently prevents updating other rows
24832483
postgres=> update passwd set pwhash = 'abc';
24842484
UPDATE 1

0 commit comments

Comments
 (0)