All Products
Search
Document Center

Hologres:Session information functions

Last Updated:Oct 24, 2024

Compatible with PostgreSQL, Hologres allows you to use standard PostgreSQL syntax for data development.

The following table describes the session information functions supported by Hologres. The functions supported by Hologres are only a subset of the PostgreSQL functions. For more information about how to use these functions, see System Information Functions in the PostgreSQL documentation.
Function Description
current_catalog Returns the name of the current database.
current_database() Returns the name of the current database.
current_query() Returns the text of the current query.
current_role Returns the name of the current user.
current_schema[()] Returns the name of the current schema.
current_schemas(boolean) Returns an array of the names of all schemas in the current search path.
current_user Returns the name of the current user.
inet_client_addr() Returns the IP address of the remote connection.
inet_client_port() Returns the port number of the remote connection.
inet_server_addr() Returns the IP address of the current server.
inet_server_port() Returns the port number of the current server.
pg_backend_pid() Returns the ID of the server process where the current session resides.
pg_blocking_pids(int) Returns the ID of the process that is blocking the server process with a specified ID from acquiring the lock.
session_user Returns the name of the current session user.
user Returns the name of the current user.
version() Returns the version of PostgreSQL.