Skip to content

CURRENT_CATALOG

SELECT CURRENT_CATALOG;
'postgres'

The CURRENT_CATALOG command, when run, returns the name of the current database. In the example above, the command returned ‘postgres’, which is the default database used by PostgreSQL.