Skip to content

Commit 790be6f

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 1372166 commit 790be6f

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
@@ -2442,7 +2442,7 @@ postgres=> table passwd;
24422442
postgres=> set role alice;
24432443
SET
24442444
postgres=> table passwd;
2445-
ERROR: permission denied for relation passwd
2445+
ERROR: permission denied for table passwd
24462446
postgres=> select user_name,real_name,home_phone,extra_info,home_dir,shell from passwd;
24472447
user_name | real_name | home_phone | extra_info | home_dir | shell
24482448
-----------+-----------+--------------+------------+-------------+-----------
@@ -2452,7 +2452,7 @@ postgres=> select user_name,real_name,home_phone,extra_info,home_dir,shell fr
24522452
(3 rows)
24532453

24542454
postgres=> update passwd set user_name = 'joe';
2455-
ERROR: permission denied for relation passwd
2455+
ERROR: permission denied for table passwd
24562456
-- Alice is allowed to change her own real_name, but no others
24572457
postgres=> update passwd set real_name = 'Alice Doe';
24582458
UPDATE 1
@@ -2461,9 +2461,9 @@ UPDATE 0
24612461
postgres=> update passwd set shell = '/bin/xx';
24622462
ERROR: new row violates WITH CHECK OPTION for "passwd"
24632463
postgres=> delete from passwd;
2464-
ERROR: permission denied for relation passwd
2464+
ERROR: permission denied for table passwd
24652465
postgres=> insert into passwd (user_name) values ('xxx');
2466-
ERROR: permission denied for relation passwd
2466+
ERROR: permission denied for table passwd
24672467
-- Alice can change her own password; RLS silently prevents updating other rows
24682468
postgres=> update passwd set pwhash = 'abc';
24692469
UPDATE 1

0 commit comments

Comments
 (0)