mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
doc: Update error messages in RLS examples
Since 8b9e9644d
, the messages for failed permissions checks report
"table" where appropriate, rather than "relation".
Backpatch to all supported branches
This commit is contained in:
@ -2569,7 +2569,7 @@ postgres=> table passwd;
|
|||||||
postgres=> set role alice;
|
postgres=> set role alice;
|
||||||
SET
|
SET
|
||||||
postgres=> table passwd;
|
postgres=> table passwd;
|
||||||
ERROR: permission denied for relation passwd
|
ERROR: permission denied for table passwd
|
||||||
postgres=> select user_name,real_name,home_phone,extra_info,home_dir,shell from passwd;
|
postgres=> select user_name,real_name,home_phone,extra_info,home_dir,shell from passwd;
|
||||||
user_name | real_name | home_phone | extra_info | home_dir | shell
|
user_name | real_name | home_phone | extra_info | home_dir | shell
|
||||||
-----------+-----------+--------------+------------+-------------+-----------
|
-----------+-----------+--------------+------------+-------------+-----------
|
||||||
@ -2579,7 +2579,7 @@ postgres=> select user_name,real_name,home_phone,extra_info,home_dir,shell fr
|
|||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
postgres=> update passwd set user_name = 'joe';
|
postgres=> update passwd set user_name = 'joe';
|
||||||
ERROR: permission denied for relation passwd
|
ERROR: permission denied for table passwd
|
||||||
-- Alice is allowed to change her own real_name, but no others
|
-- Alice is allowed to change her own real_name, but no others
|
||||||
postgres=> update passwd set real_name = 'Alice Doe';
|
postgres=> update passwd set real_name = 'Alice Doe';
|
||||||
UPDATE 1
|
UPDATE 1
|
||||||
@ -2588,9 +2588,9 @@ UPDATE 0
|
|||||||
postgres=> update passwd set shell = '/bin/xx';
|
postgres=> update passwd set shell = '/bin/xx';
|
||||||
ERROR: new row violates WITH CHECK OPTION for "passwd"
|
ERROR: new row violates WITH CHECK OPTION for "passwd"
|
||||||
postgres=> delete from passwd;
|
postgres=> delete from passwd;
|
||||||
ERROR: permission denied for relation passwd
|
ERROR: permission denied for table passwd
|
||||||
postgres=> insert into passwd (user_name) values ('xxx');
|
postgres=> insert into passwd (user_name) values ('xxx');
|
||||||
ERROR: permission denied for relation passwd
|
ERROR: permission denied for table passwd
|
||||||
-- Alice can change her own password; RLS silently prevents updating other rows
|
-- Alice can change her own password; RLS silently prevents updating other rows
|
||||||
postgres=> update passwd set pwhash = 'abc';
|
postgres=> update passwd set pwhash = 'abc';
|
||||||
UPDATE 1
|
UPDATE 1
|
||||||
|
Reference in New Issue
Block a user