Menu
Amazon Redshift
Database Developer Guide (API Version 2012-12-01)

SESSION_USER

Returns the name of the user associated with the current session. This is the user who initiated the current database connection.

Note

Do not use trailing parentheses when calling SESSION_USER.

Syntax

Copy
session_user

Return Type

Returns a CHAR or VARCHAR string.

Example

The following example returns the current session user:

Copy
select session_user; session_user -------------- dwuser (1 row)

On this page: