diff options
| author | Stephen Frost <sfrost@snowman.net> | 2015-03-19 15:02:33 -0400 |
|---|---|---|
| committer | Stephen Frost <sfrost@snowman.net> | 2015-03-19 15:02:33 -0400 |
| commit | bf038899965263dbc4aef2b43c8fdfe6f49b788f (patch) | |
| tree | f69bedcc39eee9b9916047915de92e00d8448761 /doc/src | |
| parent | 12968cf4085409c50f70c6643d92befdb34008f6 (diff) | |
GetUserId() changes to has_privs_of_role()
The pg_stat and pg_signal-related functions have been using GetUserId()
instead of has_privs_of_role() for checking if the current user should
be able to see details in pg_stat_activity or signal other processes,
requiring a user to do 'SET ROLE' for inheirited roles for a permissions
check, unlike other permissions checks.
This patch changes that behavior to, instead, act like most other
permission checks and use has_privs_of_role(), removing the 'SET ROLE'
need. Documentation and error messages updated accordingly.
Per discussion with Alvaro, Peter, Adam (though not using Adam's patch),
and Robert.
Reviewed by Jeevan Chalke.
Diffstat (limited to 'doc/src')
| -rw-r--r-- | doc/src/sgml/func.sgml | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 5843eaa9ffe..aa19e104d92 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -16328,9 +16328,9 @@ SELECT set_config('log_statement_stats', 'off', false); <literal><function>pg_cancel_backend(<parameter>pid</parameter> <type>int</>)</function></literal> </entry> <entry><type>boolean</type></entry> - <entry>Cancel a backend's current query. You can execute this against - another backend that has exactly the same role as the user calling the - function. In all other cases, you must be a superuser. + <entry>Cancel a backend's current query. This is also allowed if the + calling role is a member of the role whose backend is being cancelled, + however only superusers can cancel superuser backends. </entry> </row> <row> @@ -16352,10 +16352,9 @@ SELECT set_config('log_statement_stats', 'off', false); <literal><function>pg_terminate_backend(<parameter>pid</parameter> <type>int</>)</function></literal> </entry> <entry><type>boolean</type></entry> - <entry>Terminate a backend. You can execute this against - another backend that has exactly the same role as the user - calling the function. In all other cases, you must be a - superuser. + <entry>Terminate a backend. This is also allowed if the calling role + is a member of the role whose backend is being terminated, however only + superusers can terminate superuser backends. </entry> </row> </tbody> |
