PostgreSQL List all databases

To list all databases in PostgreSQL database, first connect to PostgreSQL database using psql command

su - postgres

Now run


This will list all available databases.

To change to a database, use command /connect

\connect DBNAME

Once you connected to a database, you can list all tables in a database with command

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *