current_schema

A function returning the name of the current schema

current_schema is a system function returning the name of the current schema.

current_schema was added in PostgreSQL 8.4.

Usage

current_schema → name

current_schema is provided as an SQL-standard equivalent to current_schema().

Change history

Examples

Execution of current_schema:

postgres=# SELECT current_schema;
 current_schema
----------------
 public
(1 row)

postgres=# SET search_path TO pg_catalog;
SET

postgres=# SELECT current_schema;
 current_schema
----------------
 pg_catalog
(1 row)

Categories

Schema (namespace), System function

See also

current_schema(), current_catalog