Wiki / psql Commands / Describe database objects
\list
List the databases in the server and show their names, owners, character set encodings, and access privileges. If pattern is specified, only databases whose names match the pattern are listed. If x is appended to the command name, the results are di…
Reading PostgreSQL 18.6.
Description
List the databases in the server and show their names, owners, character set encodings, and access privileges. If pattern is specified, only databases whose names match the pattern are listed. If x is appended to the command name, the results are displayed in expanded mode. If + is appended to the command name, database sizes, default tablespaces, and descriptions are also displayed. Size information is available for databases on which the current user has CONNECT privilege, or if the current user is a superuser or has privileges of the pg_read_all_stats role.
- Client
- psql 18.6
- Case-sensitive spelling
- \list
Usage
\l[x+] or \list[x+] [ pattern ]Manual definition
\l[x+]or\list[x+] [pattern]-
List the databases in the server and show their names, owners, character set encodings, and access privileges. If
patternis specified, only databases whose names match the pattern are listed. Ifxis appended to the command name, the results are displayed in expanded mode. If+is appended to the command name, database sizes, default tablespaces, and descriptions are also displayed. Size information is available for databases on which the current user hasCONNECTprivilege, or if the current user is a superuser or has privileges of thepg_read_all_statsrole.
Related entries
Documentation and source
Source build
- Version
- 18.6
- Build
- https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2
- Source fingerprint
ee8d1a3612338fd9adf250730cb640fcc5233b5491337cc00a316a44e3a0b9f8
Compare versions
PostgreSQL 13 → 14: changed.
--- PostgreSQL 13
+++ PostgreSQL 14
@@ -1,5 +1,5 @@
{
- "definition": "List the databases in the server and show their names, owners, character set encodings, and access privileges. If pattern is specified, only databases whose names match the pattern are listed. If + is appended to the command name, database sizes, default tablespaces, and descriptions are also displayed. (Size information is only available for databases that the current user can connect to.)",
+ "definition": "List the databases in the server and show their names, owners, character set encodings, and access privileges. If pattern is specified, only databases whose names match the pattern are listed. If + is appended to the command name, database sizes, default tablespaces, and descriptions are also displayed. Size information is available for databases on which the current user has CONNECT privilege, or if the current user is a superuser or has privileges of the pg_read_all_stats role.",
"modifiers": [
{
"command": "\\l",
Compares recorded interfaces and attributes. Source fingerprints and build metadata are excluded; an absent sample is not proof of the introduction or removal release.
Related entries
Export JSON · Back to psql Commands · Recorded in PostgreSQL 10 through 20; the first sample is not necessarily its introduction.