CURRENT_DATABASE()
Return the database for the current session.
CURRENT_DATABASE()
CURRENT_CATALOGThese functions are synonyms. CURRENT_DATABASE() requires the parentheses. CURRENT_CATALOG does not work with parentheses.
premdb=# select CURRENT_DATABASE();
current_database
------------------
premdb
(1 row)premdb=# SELECT CURRENT_CATALOG;
current_database
------------------
premdb
(1 row)Parent topic:System Functions