17.10 - Result Value - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-28
dita:mapPath
SQL_Functions__Expressions__and_Predicates.Upload_071421/djk1612415574830.ditamap
dita:ditavalPath
SQL_Functions__Expressions__and_Predicates.Upload_071421/wrg1590696035526.ditaval
dita:id
kby1472250656485

If you are not accessing Vantage through a proxy connection, CURRENT_ROLE functions exactly like the ROLE built-in function and returns the session current role, which is the current role of the session user. For more information, see ROLE.

If you are accessing Vantage through a proxy connection, then CURRENT_ROLE returns the current role of the proxy user as shown in the following table.

IF the current role for the session is … THEN the result value is …
a role set by PROXYROLE the name of the role.
the default If there is one proxy role in the CONNECT THROUGH privilege of the proxy user, the result value is the name of the role.

If there are multiple proxy roles in the CONNECT THROUGH privilege of the proxy user, the result value is ALL.

PROXYROLE=ALL ALL
PROXYROLE=NONE or NULL NULL