Friday, 29 June 2018

How to get a list of all the databases in PostgreSQL

You can get a list of all the databases in a PostgreSQL cluster by either using a psql meta command or by executing a query.

PSQL

  1. Open psql
  2. Type \l (lowercase L) and press Enter

Query

The query to view a list of all databases in a cluster is:



No comments:

Post a Comment