SHOW DATABASES statement lists all databases in the CockroachDB cluster.
No privileges are required to list the databases in the CockroachDB cluster.
> SHOW DATABASES;
+---------------+ | database_name | +---------------+ | defaultdb | | postgres | | system | +---------------+ (3 rows)
New clusters and existing clusters upgraded to v2.1 will include three auto-generated databases, with the following purposes:
defaultdbdatabase is used if a client does not specify a database in the connection parameters.
An empty database called
postgresis provided for compatibility with Postgres client applications that require it.
systemdatabase contains CockroachDB metadata and is read-only.
defaultdb databases can be deleted if they are not needed.