10000 doc: Update error messages in RLS examples · postgres/postgres@eac34f7 · GitHub
[go: up one dir, main page]

Skip to content

Commit eac34f7

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 ea40625 commit eac34f7

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
@@ -1852,7 +1852,7 @@ postgres=> table passwd;
18521852
postgres=> set role alice;
18531853
SET
18541854
postgres=> table passwd;
1855-
ERROR: permission denied for relation passwd
1855+
ERROR: permission denied for table passwd
18561856
postgres=> select user_name,real_name,home_phone,extra_info,home_dir,shell from passwd;
18571857
user_name | real_name | home_phone | extra_info | home_dir | shell
18581858
-----------+-----------+--------------+------------+-------------+-----------
@@ -1862,7 +1862,7 @@ postgres=> select user_name,real_name,home_phone,extra_info,home_dir,shell fr
18621862
(3 rows)
18631863

18641864
postgres=> update passwd set user_name = 'joe';
1865-
ERROR: permission denied for relation passwd
1865+
ERROR: permission denied for table passwd
18661866
-- Alice is allowed to change her own real_name, but no others
18671867
postgres=> update passwd set real_name = 'Alice Doe';
18681868
UPDATE 1
@@ -1871,9 +1871,9 @@ UPDATE 0
18711871
postgres=> update passwd set shell = '/bin/xx';
18721872
ERROR: new row violates WITH CHECK OPTION for "passwd"
18731873
postgres=> delete from passwd;
1874-
ERROR: permission denied for relation passwd
1874+
ERROR: permission denied for table passwd
18751875
postgres=> insert into passwd (user_name) values ('xxx');
1876-
ERROR: permission denied for relation passwd
1876+
ERROR: permission denied for table passwd
18771877
-- Alice can change her own password; RLS silently prevents updating other rows
18781878
postgres=> update passwd set pwhash = 'abc';
18791879
UPDATE 1

0 commit comments

Comments
 (0)
0