Cloud

Other Functions

Besides math, aggregate, window, string, timestamp, and json functions, Redpanda SQL also supports these functions:

Function Description

COALESCE

Returns the first argument that is not NULL, while the remaining arguments from the first non-null argument are not evaluated.

current_database()

Returns the current database’s name.

current_schema()

Returns the schema’s name (first in the search path).

has_schema_privilege()

Checks whether the current user has specific privileges on a schema.

NULLIF

Replaces a given value with NULL if it matches a specific criterion.

pg_get_expr()

Retrieves the internal form of an individual expression (such as the default value for a column).

pg_total_relation_size()

Retrieves the size of a table.

pg_typeof()

Retrieves the data type of any given value.

pg_encoding_to_char()

Converts an encoding internal identifier to a human-readable name.

pg_get_indexdef()

Reconstructs the PostgreSQL command used to retrieve the definition of a specified index.

pg_get_userbyid()

Retrieves the name of a user (role) given its unique identifier (OID).

pg_relation_is_publishable()

Determines whether a specified relation (table) can be published in a publication.

pg_size_pretty()

Converts sizes in bytes into a human-readable format.

pg_table_size()

Retrieves the size of a specific table, including its associated storage components but excluding indexes.

pg_table_is_visible()

Checks whether a specified table (or other database object) is visible in the current schema search path.

pg_get_constraintdef()

Retrieves the definition of a specific constraint in a human-readable format.

pg_get_statisticsobjdef_columns()

Retrieves the definitions of columns associated with a specified statistics object.

obj_description()

Returns the comment associated with a specific database object.

col_description()

Retrieves the comment associated with a specified table column based on its name.

shobj_description()

Retrieves the comment associated with a shared database object.

pg_backend_pid()

Returns the process ID (PID) of the node handling the current session.