PostgreSQL – List Databases

Background Let us list databases. Code Outline Access pg_catalog.pg_database pg_catalog.pg_tablespace Default Table space Name pg_database.dattablespace = pg_tablespace.oid pg_catalog.pg_authid Authorizer pg_database.datdba = pg_authid.oid pg_catalog.pg_encoding_to_char Encoding pg_catalog.pg_encoding_to_char(pg_database.encoding ) pg_catalog.pg_stat_file Database Creation Date pg_catalog.pg_stat_file ( 'base' ||'/' ||pg_database.oid ||'/' ||'PG_VERSION' ) SQL Output References PostgreSQL Functions and Operators System Administrative Functions Link