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:<
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
Version of cocoon>cocoon-databases dependency
List of Version of cocoon>cocoon-databases 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
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
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
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
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
how to list volumes in docker
how to list volumes in docker  Hi, I have docker and i want to list all the volumes. how to list volumes in docker? After listing i want to delete...; Hi, To list the volumes in docker you can use following command: docker
how to list environments in conda
how to list environments in conda  Hi, I am using Anaconda Python... want to get list of all the how environments in Anaconda Python. How to list... Anaconda Python for their work. You can use the following command to get list
how to list environments in conda
how to list environments in conda  Hi, I am using Anaconda Python... want to get list of all the how environments in Anaconda Python. How to list... Anaconda Python for their work. You can use the following command to get list
How to list files in hadoop?
How to list files in hadoop?  Hi, I want to list the files from a directory in HDFS. How to list files in hadoop? Thanks   Hi, Hadoop... provides commands to interact with the HDFS. To list down all the file
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
How to view a list of MySQL users and their privileges?
How to view a list of MySQL users and their privileges?  Hi, How to view a list of MySQL users and their privileges? It want to view these two... many users and databases on production server then you can easily view list
How to use List in velocity
How to use List in velocity       This Example shows you how to use List in velocity. ...("stuList", list);   Template t = ve.getTemplate
Mysql List
; Mysql List elaborate you an Query for listing databases,tables... show you the list of Query for viewing the details of databases,tables... to view the list of databases. Query for listing databases:ADS_TO_REPLACE_2 mysql>
Mysql List
; Mysql List elaborate you an Query for listing databases, tables, Procedure... show you the list of Query for viewing the details of databases,tables... the list of databases.  ADS_TO_REPLACE_2     Query
ModuleNotFoundError: No module named 'roundcube_merge_databases'
: No module named 'roundcube_merge_databases' How to remove the ModuleNotFoundError: No module named 'roundcube_merge_databases' error? Thanks  ...ModuleNotFoundError: No module named 'roundcube_merge_databases'  Hi
ModuleNotFoundError: No module named 'lazr_postgresql'
named 'lazr_postgresql' How to remove the ModuleNotFoundError: No module named 'lazr_postgresql' error? Thanks   Hi, In your python...ModuleNotFoundError: No module named 'lazr_postgresql'  Hi, My
ModuleNotFoundError: No module named 'lazr_postgresql'
named 'lazr_postgresql' How to remove the ModuleNotFoundError: No module named 'lazr_postgresql' error? Thanks   Hi, In your python...ModuleNotFoundError: No module named 'lazr_postgresql'  Hi, My
ModuleNotFoundError: No module named 'postgresql-api'
named 'postgresql-api' How to remove the ModuleNotFoundError: No module named 'postgresql-api' error? Thanks   Hi, In your python...ModuleNotFoundError: No module named 'postgresql-api'  Hi, My
ModuleNotFoundError: No module named 'PostgreSQL-Audit'
named 'PostgreSQL-Audit' How to remove the ModuleNotFoundError: No module named 'PostgreSQL-Audit' error? Thanks   Hi, In your...ModuleNotFoundError: No module named 'PostgreSQL-Audit'  Hi, My
ModuleNotFoundError: No module named 'postgresql-deepgeo'
named 'postgresql-deepgeo' How to remove the ModuleNotFoundError: No module named 'postgresql-deepgeo' error? Thanks   Hi, In your...ModuleNotFoundError: No module named 'postgresql-deepgeo'  Hi, My
ModuleNotFoundError: No module named 'pulumi-postgresql'
named 'pulumi-postgresql' How to remove the ModuleNotFoundError: No module named 'pulumi-postgresql' error? Thanks   Hi, In your...ModuleNotFoundError: No module named 'pulumi-postgresql'  Hi, My

Ads