Skip to content

Commit f5d60b1

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 b135a94 commit f5d60b1

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
@@ -2569,7 +2569,7 @@ postgres=> table passwd;
25692569
postgres=> set role alice;
25702570
SET
25712571
postgres=> table passwd;
2572-
ERROR: permission denied for relation passwd
2572+
ERROR: permission denied for table passwd
25732573
postgres=> select user_name,real_name,home_phone,extra_info,home_dir,shell from passwd;
25742574
user_name | real_name | home_phone | extra_info | home_dir | shell
25752575
-----------+-----------+--------------+------------+-------------+-----------
@@ -2579,7 +2579,7 @@ postgres=> select user_name,real_name,home_phone,extra_info,home_dir,shell fr
25792579
(3 rows)
25802580

25812581
postgres=> update passwd set user_name = 'joe';
2582-
ERROR: permission denied for relation passwd
2582+
ERROR: permission denied for table passwd
25832583
-- Alice is allowed to change her own real_name, but no others
25842584
postgres=> update passwd set real_name = 'Alice Doe';
25852585
UPDATE 1
@@ -2588,9 +2588,9 @@ UPDATE 0
25882588
postgres=> update passwd set shell = '/bin/xx';
25892589
ERROR: new row violates WITH CHECK OPTION for "passwd"
25902590
postgres=> delete from passwd;
2591-
ERROR: permission denied for relation passwd
2591+
ERROR: permission denied for table passwd
25922592
postgres=> insert into passwd (user_name) values ('xxx');
2593-
ERROR: permission denied for relation passwd
2593+
ERROR: permission denied for table passwd
25942594
-- Alice can change her own password; RLS silently prevents updating other rows
25952595
postgres=> update passwd set pwhash = 'abc';
25962596
UPDATE 1

0 commit comments

Comments
 (0)