Set a Client Connection Label

This tip was authored by Jim Knicely.

When you connect to a Vertica database you can set a client connection label to help you later identify the connection.

Example:

=> SELECT SET_CLIENT_LABEL('Daily Load');
        SET_CLIENT_LABEL
--------------------------------
client_label set to Daily Load
(1 row)

=> SELECT GET_CLIENT_LABEL();
GET_CLIENT_LABEL
------------------
Daily Load
(1 row)

=> SELECT client_label FROM sessions WHERE session_id = current_session();
client_label
--------------
Daily Load
(1 row)

Have fun!

Comments

  • edited February 2018

    Hi!

    It depends on "client", JDBC/ODBC/Python driver/UDx has another approach. With UDx you can not query database.

Sign In or Register to comment.