How to list databases in PostgreSQL

How to list databases in PostgreSQL

Hi,

I want to connect to Postgresql database and see all the databases stored in the database. How to list databases in PostgreSQL?

View Answers

February 7, 2019 at 3:13 AM

Hi,

You can do all these with the psql prompt of postgresql.

change user to postgres

su - postgres

The open psql tool by typing psql on the console:

psql

Now you can list the database names with the '\l' command. Here is example of listing databases in postgresql database server. List databases on the server:

\l

Then connect to database with the command:

\c template1

Thanks









Related Tutorials/Questions & Answers:
How to list databases in PostgreSQL
How to list databases in PostgreSQL  Hi, I want to connect to Postgresql database and see all the databases stored in the database. How to list databases in PostgreSQL?   Hi, You can do all these with the psql prompt
Hibernate 4 Supported Databases List
Hibernate 4 Supported Databases List In this tutorial you will learn that how many databases are supported by Hibernate. You must be looking for the list... gives you the list of Hibernate supported databases with the name of Dialect
Advertisements
Version of postgresql>postgresql dependency
List of Version of postgresql>postgresql dependency
Artifacts of postgresql
List of Artifacts of postgresql maven depenency
Databases
Databases  how to add data dynamically into the database table?? i used back end is mysql....   1)form.jsp: <html> <form method="post" action="insertdata.jsp"> <table> <tr><td>Name:<
Version of cocoon>cocoon-databases dependency
List of Version of cocoon>cocoon-databases dependency
need help....how to connect and disconnect multiple databases(databases created in mysql) using java and my sql
need help....how to connect and disconnect multiple databases(databases created in mysql) using java and my sql  i am working on a project... to know that how to query multiple databases(databases created in my mysql) so
postgresql - postgresql version 8.4-702.jdbc4 Maven dependency. How to use postgresql version 8.4-702.jdbc4 in pom.xml?
postgresql  - Version 8.4-702.jdbc4 of postgresql Maven dependency? How...? How to use postgresql version 8.4-702.jdbc4 in pom.xml? Learn to use... dependency tree How to add Gradle  dependency? How to use  postgresql
Version of postgresql>pljava-public dependency
List of Version of postgresql>pljava-public dependency
Version of com.dripower>postgresql-async_2.11 dependency
List of Version of com.dripower>postgresql-async_2.11 dependency
Version of com.eventsourcing>eventsourcing-postgresql dependency
List of Version of com.eventsourcing>eventsourcing-postgresql dependency
Version of com.snacktrace>storm-postgresql dependency
List of Version of com.snacktrace>storm-postgresql dependency
How to Install and Use PostgreSQL on Ubuntu 18.04
How to Install and Use PostgreSQL on Ubuntu 18.04  Hi, I want to install PostgreSQL on Ubuntu 18.04. I have Ubuntu 18.04 desktop installed on my system and need to install it. What are the process of installing PostgreSQL
How to Install and Use PostgreSQL on Ubuntu 18.04
How to Install and Use PostgreSQL on Ubuntu 18.04  Hi, I want to install PostgreSQL on Ubuntu 18.04. I have Ubuntu 18.04 desktop installed on my system and need to install it. What are the process of installing PostgreSQL
Switch databases
Switch databases  How do you inter-change between relational databases without code changes
ModuleNotFoundError: No module named 'databases'
'databases' How to remove the ModuleNotFoundError: No module named 'databases' error? Thanks   Hi, In your python environment you...ModuleNotFoundError: No module named 'databases'  Hi, My Python
ModuleNotFoundError: No module named 'databases'
'databases' How to remove the ModuleNotFoundError: No module named 'databases' error? Thanks   Hi, In your python environment you...ModuleNotFoundError: No module named 'databases'  Hi, My Python
databases
databases
databases
databases
databases
org.postgresql - postgresql version 9.4.1207.jre7 Maven dependency. How to use postgresql version 9.4.1207.jre7 in pom.xml?
org.postgresql  - Version 9.4.1207.jre7 of postgresql Maven dependency? How to use  org.postgresql  - Version 9.4.1207.jre7 of postgresql in pom.xml? How to use postgresql version 9.4.1207.jre7 in pom.xml? Learn to use
ru.yandex.qatools.embed - postgresql-embedded version 1.23 Maven dependency. How to use postgresql-embedded version 1.23 in pom.xml?
ru.yandex.qatools.embed  - Version 1.23 of postgresql-embedded Maven dependency? How to use  ru.yandex.qatools.embed  - Version 1.23 of postgresql-embedded in pom.xml? How to use postgresql-embedded version 1.23 in pom.xml
ru.yandex.qatools.embed - postgresql-embedded version 1.12 Maven dependency. How to use postgresql-embedded version 1.12 in pom.xml?
ru.yandex.qatools.embed  - Version 1.12 of postgresql-embedded Maven dependency? How to use  ru.yandex.qatools.embed  - Version 1.12 of postgresql-embedded in pom.xml? How to use postgresql-embedded version 1.12 in pom.xml
ru.yandex.qatools.embed - postgresql-embedded version 2.5 Maven dependency. How to use postgresql-embedded version 2.5 in pom.xml?
ru.yandex.qatools.embed  - Version 2.5 of postgresql-embedded Maven dependency? How to use  ru.yandex.qatools.embed  - Version 2.5 of postgresql-embedded in pom.xml? How to use postgresql-embedded version 2.5 in pom.xml
ru.yandex.qatools.embed - postgresql-embedded version 2.5 Maven dependency. How to use postgresql-embedded version 2.5 in pom.xml?
ru.yandex.qatools.embed  - Version 2.5 of postgresql-embedded Maven dependency? How to use  ru.yandex.qatools.embed  - Version 2.5 of postgresql-embedded in pom.xml? How to use postgresql-embedded version 2.5 in pom.xml
us.fatehi - schemacrawler-postgresql version 14.01.01 Maven dependency. How to use schemacrawler-postgresql version 14.01.01 in pom.xml?
us.fatehi  - Version 14.01.01 of schemacrawler-postgresql Maven dependency? How to use  us.fatehi  - Version 14.01.01 of schemacrawler-postgresql in pom.xml? How to use schemacrawler-postgresql version 14.01.01 in pom.xml
us.fatehi - schemacrawler-postgresql version 14.01.01 Maven dependency. How to use schemacrawler-postgresql version 14.01.01 in pom.xml?
us.fatehi  - Version 14.01.01 of schemacrawler-postgresql Maven dependency? How to use  us.fatehi  - Version 14.01.01 of schemacrawler-postgresql in pom.xml? How to use schemacrawler-postgresql version 14.01.01 in pom.xml
us.fatehi - schemacrawler-postgresql version 14.09.03 Maven dependency. How to use schemacrawler-postgresql version 14.09.03 in pom.xml?
us.fatehi  - Version 14.09.03 of schemacrawler-postgresql Maven dependency? How to use  us.fatehi  - Version 14.09.03 of schemacrawler-postgresql in pom.xml? How to use schemacrawler-postgresql version 14.09.03 in pom.xml
com.github.jasync-sql - jasync-postgresql version 1.1.1-kts-6 Maven dependency. How to use jasync-postgresql version 1.1.1-kts-6 in pom.xml?
com.github.jasync-sql  - Version 1.1.1-kts-6 of jasync-postgresql Maven dependency? How to use  com.github.jasync-sql  - Version 1.1.1-kts-6 of jasync-postgresql in pom.xml? How to use jasync-postgresql version 1.1.1-kts-6
com.eventsourcing - eventsourcing-postgresql version 0.4.5 Maven dependency. How to use eventsourcing-postgresql version 0.4.5 in pom.xml?
com.eventsourcing  - Version 0.4.5 of eventsourcing-postgresql Maven dependency? How to use  com.eventsourcing  - Version 0.4.5 of eventsourcing-postgresql in pom.xml? How to use eventsourcing-postgresql version 0.4.5
us.fatehi - schemacrawler-postgresql version 15.01.05 Maven dependency. How to use schemacrawler-postgresql version 15.01.05 in pom.xml?
us.fatehi  - Version 15.01.05 of schemacrawler-postgresql Maven dependency? How to use  us.fatehi  - Version 15.01.05 of schemacrawler-postgresql in pom.xml? How to use schemacrawler-postgresql version 15.01.05 in pom.xml
Video Tutorial: Hibernate 4 Supported Databases List
Hibernate 4 Supported Databases List Hibernate being an object relational... databases. Here, the list of Hibernate 4 was compiled which supports the MySQL... is the video tutorial of "Hibernate 4 Supported Databases List
ModuleNotFoundError: No module named 'pymedphys-databases'
named 'pymedphys-databases' How to remove the ModuleNotFoundError: No module named 'pymedphys-databases' error? Thanks   Hi...ModuleNotFoundError: No module named 'pymedphys-databases'  Hi, My
ModuleNotFoundError: No module named 'imbalanced-databases'
: No module named 'imbalanced-databases' How to remove the ModuleNotFoundError: No module named 'imbalanced-databases' error? Thanks   Hi...ModuleNotFoundError: No module named 'imbalanced-databases'  Hi
connecting databases
connecting databases  I need to connect mysql on 2 or more remote pc'c. how can i giv the ip address for 2 or more systems. is it possible to connect to the required systems by user specifying the database and table name my
Maven Repository/Dependency: postgresql | postgresql
Maven Repository/Dependency of Group ID postgresql and Artifact ID postgresql. Latest version of postgresql:postgresql dependencies... What is Apache Maven? How to create Maven Web Application in Eclipse
JanusGraph Supported Databases
processing engine which supports many back-end databases. Here is the list of database...JanusGraph Supported Databases  Hi, I want to choose the backend for JanusGraph to store my graphs. Which all databases are supported by JanusGraph
mysqldump all databases
mysqldump all databases  How to take the backup of complete data including all the databases in the MySQL Server? Is there one command to take...-databases > all_databases.sql Thanks
Databases supported by Jdeveloper?
Databases supported by Jdeveloper?  I want to know what databases are supported by jdeveloper ?and any light database for jdeveloper
io.vertx - vertx-mysql-postgresql-client version 3.6.3 Maven dependency. How to use vertx-mysql-postgresql-client version 3.6.3 in pom.xml?
io.vertx  - Version 3.6.3 of vertx-mysql-postgresql-client Maven dependency? How to use  io.vertx  - Version 3.6.3 of vertx-mysql-postgresql-client in pom.xml? How to use vertx-mysql-postgresql-client version 3.6.3
io.vertx - vertx-mysql-postgresql-client version 3.9.5 Maven dependency. How to use vertx-mysql-postgresql-client version 3.9.5 in pom.xml?
io.vertx  - Version 3.9.5 of vertx-mysql-postgresql-client Maven dependency? How to use  io.vertx  - Version 3.9.5 of vertx-mysql-postgresql-client in pom.xml? How to use vertx-mysql-postgresql-client version 3.9.5
Maven dependency for cocoon - cocoon-databases version 2.1.9 is released. Learn to use cocoon-databases version 2.1.9 in Maven based Java projects
if it is based on Maven and Gradle. How to use  cocoon - cocoon-databases version...Maven dependency for  cocoon  - Version 2.1.9 of cocoon-databases released The developers of   cocoon - cocoon-databases project have
Maven dependency for cocoon - cocoon-databases version 2.1.8 is released. Learn to use cocoon-databases version 2.1.8 in Maven based Java projects
if it is based on Maven and Gradle. How to use  cocoon - cocoon-databases version...Maven dependency for  cocoon  - Version 2.1.8 of cocoon-databases released The developers of   cocoon - cocoon-databases project have
Maven dependency for cocoon - cocoon-databases version 2.1.7 is released. Learn to use cocoon-databases version 2.1.7 in Maven based Java projects
if it is based on Maven and Gradle. How to use  cocoon - cocoon-databases version...Maven dependency for  cocoon  - Version 2.1.7 of cocoon-databases released The developers of   cocoon - cocoon-databases project have
Maven dependency for cocoon - cocoon-databases version 2.1.6 is released. Learn to use cocoon-databases version 2.1.6 in Maven based Java projects
if it is based on Maven and Gradle. How to use  cocoon - cocoon-databases version...Maven dependency for  cocoon  - Version 2.1.6 of cocoon-databases released The developers of   cocoon - cocoon-databases project have
Maven dependency for cocoon - cocoon-databases version 2.1.5.1 is released. Learn to use cocoon-databases version 2.1.5.1 in Maven based Java projects
if it is based on Maven and Gradle. How to use  cocoon - cocoon-databases...Maven dependency for  cocoon  - Version 2.1.5.1 of cocoon-databases released The developers of   cocoon - cocoon-databases project have
Maven dependency for cocoon - cocoon-databases version 2.1.4 is released. Learn to use cocoon-databases version 2.1.4 in Maven based Java projects
if it is based on Maven and Gradle. How to use  cocoon - cocoon-databases version...Maven dependency for  cocoon  - Version 2.1.4 of cocoon-databases released The developers of   cocoon - cocoon-databases project have
Maven dependency for cocoon - cocoon-databases version 2.1.3 is released. Learn to use cocoon-databases version 2.1.3 in Maven based Java projects
if it is based on Maven and Gradle. How to use  cocoon - cocoon-databases version...Maven dependency for  cocoon  - Version 2.1.3 of cocoon-databases released The developers of   cocoon - cocoon-databases project have

Ads