Skip to main content
Returns the name of the user running the current query.

Syntax

Return Types

TEXT

Examples

Rows: 1Execution time: 5.75ms

The following code example shows the effective privileges of the roles directly assigned to the user running the query:

Rows: 9Execution time: 40.41ms

Example Dynamic security through a view which uses session_user().
Returns