Skip to main content

Who am I?

  • May 16, 2018
  • 0 replies
  • 1 view

Forum|alt.badge.img+2

Jim Knicely authored this tip.

There are several ways to figure out who the session user is. This comes in handy for logging.

Example:

[dbadmin@s18384357 ~]$ vsql -U jim
Welcome to vsql, the Vertica Analytic Database interactive terminal.

Type:  \h or \? for help with vsql commands
       \g or terminate with semicolon to execute query
       \q to quit

jim=> select user;
current_user
--------------
jim
(1 row)

jim=> select current_user();
current_user
--------------
jim
(1 row)

Have fun!