File tree 7 files changed +10
-9
lines changed
7 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ PostgreSQL documentation
23
23
<synopsis>
24
24
ALTER POLICY <replaceable class="parameter">name</replaceable> ON <replaceable class="parameter">table_name</replaceable>
25
25
[ RENAME TO <replaceable class="PARAMETER">new_name</replaceable> ]
26
- [ TO { <replaceable class="parameter">role_name</replaceable> | PUBLIC } [, ...] ]
26
+ [ TO { <replaceable class="parameter">role_name</replaceable> | PUBLIC | CURRENT_USER | SESSION_USER } [, ...] ]
27
27
[ USING ( <replaceable class="parameter">using_expression</replaceable> ) ]
28
28
[ WITH CHECK ( <replaceable class="parameter">check_expression</replaceable> ) ]
29
29
</synopsis>
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ PostgreSQL documentation
23
23
<synopsis>
24
24
CREATE POLICY <replaceable class="parameter">name</replaceable> ON <replaceable class="parameter">table_name</replaceable>
25
25
[ FOR { ALL | SELECT | INSERT | UPDATE | DELETE } ]
26
- [ TO { <replaceable class="parameter">role_name</replaceable> | PUBLIC } [, ...] ]
26
+ [ TO { <replaceable class="parameter">role_name</replaceable> | PUBLIC | CURRENT_USER | SESSION_USER } [, ...] ]
27
27
[ USING ( <replaceable class="parameter">using_expression</replaceable> ) ]
28
28
[ WITH CHECK ( <replaceable class="parameter">check_expression</replaceable> ) ]
29
29
</synopsis>
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ PostgreSQL documentation
22
22
<refsynopsisdiv>
23
23
<synopsis>
24
24
CREATE TABLESPACE <replaceable class="parameter">tablespace_name</replaceable>
25
- [ OWNER <replaceable class="parameter">user_name </replaceable> ]
25
+ [ OWNER { <replaceable>new_owner </replaceable> | CURRENT_USER | SESSION_USER } ]
26
26
LOCATION '<replaceable class="parameter">directory</replaceable>'
27
27
[ WITH ( <replaceable class="PARAMETER">tablespace_option</replaceable> = <replaceable class="PARAMETER">value</replaceable> [, ... ] ) ]
28
28
</synopsis>
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ PostgreSQL documentation
21
21
22
22
<refsynopsisdiv>
23
23
<synopsis>
24
- DROP OWNED BY <replaceable class="PARAMETER">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
24
+ DROP OWNED BY { <replaceable class="PARAMETER">name</replaceable> | CURRENT_USER | SESSION_USER } [, ...] [ CASCADE | RESTRICT ]
25
25
</synopsis>
26
26
</refsynopsisdiv>
27
27
Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ PostgreSQL documentation
21
21
22
22
<refsynopsisdiv>
23
23
<synopsis>
24
- REASSIGN OWNED BY <replaceable class="PARAMETER">old_role</replaceable> [, ...] TO <replaceable class="PARAMETER">new_role</replaceable>
24
+ REASSIGN OWNED BY { <replaceable class="PARAMETER">old_role</replaceable> | CURRENT_USER | SESSION_USER } [, ...]
25
+ TO { <replaceable class="PARAMETER">new_role</replaceable> | CURRENT_USER | SESSION_USER }
25
26
</synopsis>
26
27
</refsynopsisdiv>
27
28
Original file line number Diff line number Diff line change @@ -13216,13 +13216,13 @@ RoleId: RoleSpec
13216
13216
case ROLESPEC_SESSION_USER:
13217
13217
ereport (ERROR,
13218
13218
(errcode (ERRCODE_RESERVED_NAME),
13219
- errmsg (" %s cannot be used as a role name" ,
13219
+ errmsg (" %s cannot be used as a role name here " ,
13220
13220
" SESSION_USER" ),
13221
13221
parser_errposition (@1 )));
13222
13222
case ROLESPEC_CURRENT_USER:
13223
13223
ereport (ERROR,
13224
13224
(errcode (ERRCODE_RESERVED_NAME),
13225
- errmsg (" %s cannot be used as a role name" ,
13225
+ errmsg (" %s cannot be used as a role name here " ,
13226
13226
" CURRENT_USER" ),
13227
13227
parser_errposition (@1 )));
13228
13228
}
Original file line number Diff line number Diff line change @@ -43,15 +43,15 @@ CREATE ROLE "current_user";
43
43
CREATE ROLE "session_user";
44
44
CREATE ROLE "user";
45
45
CREATE ROLE current_user; -- error
46
- ERROR: CURRENT_USER cannot be used as a role name
46
+ ERROR: CURRENT_USER cannot be used as a role name here
47
47
LINE 1: CREATE ROLE current_user;
48
48
^
49
49
CREATE ROLE current_role; -- error
50
50
ERROR: syntax error at or near "current_role"
51
51
LINE 1: CREATE ROLE current_role;
52
52
^
53
53
CREATE ROLE session_user; -- error
54
- ERROR: SESSION_USER cannot be used as a role name
54
+ ERROR: SESSION_USER cannot be used as a role name here
55
55
LINE 1: CREATE ROLE session_user;
56
56
^
57
57
CREATE ROLE user; -- error
You can’t perform that action at this time.
0 commit comments