diff options
author | Michael Paquier | 2022-09-29 06:05:40 +0000 |
---|---|---|
committer | Michael Paquier | 2022-09-29 06:05:40 +0000 |
commit | 0823d061b0b7f1e20fbfd48bef3c2e093493dbd4 (patch) | |
tree | 49b915201d8f0b273a3adc7abfa5ef814fdda17e /doc/src | |
parent | 5ac9e869191148741539e626b84ba7e77dc71670 (diff) |
Introduce SYSTEM_USER
SYSTEM_USER is a reserved keyword of the SQL specification that,
roughly described, is aimed at reporting some information about the
system user who has connected to the database server. It may include
implementation-specific information about the means by the user
connected, like an authentication method.
This commit implements SYSTEM_USER as of auth_method:identity, where
"auth_method" is a keyword about the authentication method used to log
into the server (like peer, md5, scram-sha-256, gss, etc.) and
"identity" is the authentication identity as introduced by 9afffcb (peer
sets authn to the OS user name, gss to the user principal, etc.). This
format has been suggested by Tom Lane.
Note that thanks to d951052, SYSTEM_USER is available to parallel
workers.
Bump catalog version.
Author: Bertrand Drouvot
Reviewed-by: Jacob Champion, Joe Conway, Álvaro Herrera, Michael Paquier
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/func.sgml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 546213fa931..e82077292c6 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -22626,6 +22626,25 @@ SELECT * FROM pg_ls_dir('.') WITH ORDINALITY AS t(ls,n); <row> <entry role="func_table_entry"><para role="func_signature"> <indexterm> + <primary>system_user</primary> + </indexterm> + <function>system_user</function> + <returnvalue>text</returnvalue> + </para> + <para> + Returns the authentication method and the identity (if any) that the + user presented during the authentication cycle before they were + assigned a database role. It is represented as + <literal>auth_method:identity</literal> or + <literal>NULL</literal> if the user has not been authenticated (for + example if <link linkend="auth-trust">Trust authentication</link> has + been used). + </para></entry> + </row> + + <row> + <entry role="func_table_entry"><para role="func_signature"> + <indexterm> <primary>user</primary> </indexterm> <function>user</function> |