PostgreSQL: \list
List all databases
Examples:
Examples
postgres-> \list List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges -----------+------------+----------+-------------+-------------+------------------------------- YOUR_DB | rds_master | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/rds_master + | | | | | rds_master=CTc/rds_master rdsadmin | rdsadmin | UTF8 | en_US.UTF-8 | en_US.UTF-8 | rdsadmin=CTc/rdsadmin template0 | rdsadmin | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/rdsadmin + | | | | | rdsadmin=CTc/rdsadmin template1 | rds_master | UTF8 | en_US.UTF-8 | en_US.UTF-8 | rds_master=CTc/rds_master + | | | | | =c/rds_master (4 rows)
completePostgresql=> \list List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges --------------------+---------------------+----------+-------------+-------------+--------------------------------------------- completePostgresql | complete_postgresql | UTF8 | en_US.UTF-8 | en_US.UTF-8 | postgres | complete_postgresql | UTF8 | en_US.UTF-8 | en_US.UTF-8 | rdsadmin | rdsadmin | UTF8 | en_US.UTF-8 | en_US.UTF-8 | rdsadmin=CTc/rdsadmin + | | | | | rdstopmgr=Tc/rdsadmin template0 | rdsadmin | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/rdsadmin + | | | | | rdsadmin=CTc/rdsadmin template1 | complete_postgresql | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/complete_postgresql + | | | | | complete_postgresql=CTc/complete_postgresql (5 rows)
Related terms
- List users:
\du
- List tables:
\dt
or\dt *.*
\c YourDBName
\z YourTable
DROP DATABASE
CREATE DATABASE
- PostgreSQL Privileges
See also
- SQL, NewSQL, RDMS: GraphQL (2015), SQLite,
select, insert
,select count
, Distributed SQL, TablePlus, Cache hit ratio,pg_stat_user_tables
,EXPLAIN
, Index (PostgreSQL), DDL, SQL/MED, Group by, List users, SQL Injection, SQLAlchemy,CREATE USER, CREATE ROLE, EXPLAIN, ALTER DATABASE, REVOKE, NOLOCK, NOWAIT, EXISTS
, Unique constraint,.sql
- PostgreSQL:
pg_dump, pg_restore
,pgAdmin, pg_config, psql, pg_ctl, pg_isready, initdb
, Role, Schema, DBeaver, Navicat, DataGrip, OmniDB,Adminer
, docker-compose.xml PostgreSQL, PostgreSQL version, PostgreSQL logs,postgresql.conf
,pg_hba.conf, $HOME/.pg_service.conf
, Create database (PostgreSQL), Create user,createdb
,GRANT
,pg_stat
, PostgreSQL VACUUM, EXPLAIN,pg stat activity
, Autovacuum, ALTER DATABASE, PostgreSQL statistics collector, Shared buffers, EXPLAIN (PostgreSQL),EXPLAIN ANALYZE
, Bitmap scan,EXPLAIN VERBOSE
,EXPLAIN VERBOSE (PostgresSQL)
,WAL
,ALTER USER
,CREATE ROLE, CREATE USER
,\du
,show users
,\l
, The Statistics Collector, pganalyze,cron.schedule
, Master,pg_tables
, PostgreSQL replication,CREATE, SET
, TOAST, PgBouncer, Restore DB, Index, meta-commands, Table, foreign table, Schema, Sequence, Views, materialized view, Table Partitioning, monitoring, PostgreSQL System Administration Functions, PostgreSQL extension, privileges, logging, PGTune, PostgreSQL parameter tunning, PostgreSQL modules, pgbench, PostgreSQL users, catalogs
Advertising: