Skip to content

Commit ba8fd17

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 f7a057a commit ba8fd17

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
@@ -2456,7 +2456,7 @@ postgres=> table passwd;
24562456
postgres=> set role alice;
24572457
SET
24582458
postgres=> table passwd;
2459-
ERROR: permission denied for relation passwd
2459+
ERROR: permission denied for table passwd
24602460
postgres=> select user_name,real_name,home_phone,extra_info,home_dir,shell from passwd;
24612461
user_name | real_name | home_phone | extra_info | home_dir | shell
24622462
-----------+-----------+--------------+------------+-------------+-----------
@@ -2466,7 +2466,7 @@ postgres=> select user_name,real_name,home_phone,extra_info,home_dir,shell fr
24662466
(3 rows)
24672467

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

0 commit comments

Comments
 (0)