Skip to content

Commit 542b634

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 c9f5754 commit 542b634

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
@@ -2613,7 +2613,7 @@ postgres=> table passwd;
26132613
postgres=> set role alice;
26142614
SET
26152615
postgres=> table passwd;
2616-
ERROR: permission denied for relation passwd
2616+
ERROR: permission denied for table passwd
26172617
postgres=> select user_name,real_name,home_phone,extra_info,home_dir,shell from passwd;
26182618
user_name | real_name | home_phone | extra_info | home_dir | shell
26192619
-----------+-----------+--------------+------------+-------------+-----------
@@ -2623,7 +2623,7 @@ postgres=> select user_name,real_name,home_phone,extra_info,home_dir,shell fr
26232623
(3 rows)
26242624

26252625
postgres=> update passwd set user_name = 'joe';
2626-
ERROR: permission denied for relation passwd
2626+
ERROR: permission denied for table passwd
26272627
-- Alice is allowed to change her own real_name, but no others
26282628
postgres=> update passwd set real_name = 'Alice Doe';
26292629
UPDATE 1
@@ -2632,9 +2632,9 @@ UPDATE 0
26322632
postgres=> update passwd set shell = '/bin/xx';
26332633
ERROR: new row violates WITH CHECK OPTION for "passwd"
26342634
postgres=> delete from passwd;
2635-
ERROR: permission denied for relation passwd
2635+
ERROR: permission denied for table passwd
26362636
postgres=> insert into passwd (user_name) values ('xxx');
2637-
ERROR: permission denied for relation passwd
2637+
ERROR: permission denied for table passwd
26382638
-- Alice can change her own password; RLS silently prevents updating other rows
26392639
postgres=> update passwd set pwhash = 'abc';
26402640
UPDATE 1

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy