diff options
author | Michael Paquier <michael@paquier.xyz> | 2022-09-29 15:05:40 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2022-09-29 15:05:40 +0900 |
commit | 0823d061b0b7f1e20fbfd48bef3c2e093493dbd4 (patch) | |
tree | 49b915201d8f0b273a3adc7abfa5ef814fdda17e /src/backend/utils/adt/ruleutils.c | |
parent | 5ac9e869191148741539e626b84ba7e77dc71670 (diff) | |
download | postgresql-0823d061b0b7f1e20fbfd48bef3c2e093493dbd4.tar.gz postgresql-0823d061b0b7f1e20fbfd48bef3c2e093493dbd4.zip |
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/7e692b8c-0b11-45db-1cad-3afc5b57409f@amazon.com
Diffstat (limited to 'src/backend/utils/adt/ruleutils.c')
-rw-r--r-- | src/backend/utils/adt/ruleutils.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c index 2b7b1b0c0f6..c4184035374 100644 --- a/src/backend/utils/adt/ruleutils.c +++ b/src/backend/utils/adt/ruleutils.c @@ -10317,6 +10317,10 @@ get_func_sql_syntax(FuncExpr *expr, deparse_context *context) appendStringInfoChar(buf, ')'); return true; + case F_SYSTEM_USER: + appendStringInfoString(buf, "SYSTEM_USER"); + return true; + case F_XMLEXISTS: /* XMLEXISTS ... extra parens because args are c_expr */ appendStringInfoString(buf, "XMLEXISTS(("); |