\df[antw][S+] [PATRN] list [only agg/normal/trigger/window] functions \dF[+] [PATTERN] list text search configurations \dFd[+] [PATTERN] list text search dictionaries \dFp[+] [PATTERN] list text search parsers \dFt[+] [PATTERN] list text search templates \dg[+] [PATTERN] list rol...
$ psql#createrole dbownerwithcreatedb login;CREATEROLE#createdatabase testdb owner dbowner;CREATEDATABASE# \lListofdatabasesName|Owner|Encoding|Collate|Ctype|Access privileges---+---+---+---+---+---testdb|dbowner|UTF8|en_US.UTF-8|en_US.UTF-8|...#\q 默认情况下,postgresql本机的连接是...
# 1. 创建一个数据库,不带任何参数postgres=# create database testdb;CREATE DATABASE#查看数据库,可以看到数据库所有者是postgres,就是当前用户,默认编码格式是UTF8postgres=# \l testdb;List of databases Name|Owner|Encoding|Collate|Ctype|Access privileges ---+---+---+---+---+--- testdb|postg...
postgres=# \l+ List of databases Name | Owner | Encoding | Collate | Ctype | ICU Locale | Locale Provider | Access privileges---+---+---+---+---+---+---+---advent_of_code
List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges ---+---+---+---+---+--- postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres + | | | ...
在Postgres shell中,您可以使用\lor\list命令列出所有数据库。您将收到类似于此的输出: 代码语言:txt 复制 postgres=# \l List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges ---+---+---+---+---+--- mytestdb | postgres | UTF8 | en_US.UTF-8 | en_US.UT...
DatabasesDelete DatabasesDeleteViaIdentity DatabasesGet DatabasesGetViaIdentity DatabasesListByServer DatabasesListByServerViaIdentity FirewallRulesCreateOrUpdate FirewallRulesCreateOrUpdateViaIdentity FirewallRulesDelete FirewallRulesDeleteViaIdentity FirewallRulesGet FirewallRulesGetViaIdentity FirewallR...
List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges | Size | Tablespace | Description ---+---+---+---+---+---+---+---+--- postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | | 8633 kB | pg_default | default administrative connection...
pg_database d ORDER BY 1; *** List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges ---+---+---+---+---+--- postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c...
postgres=# # 使用 \l 用于查看已经存在的数据库: postgres=# \l List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges ---+---+---+---+---+--- postgres | postgres | SQL_ASCII | C | C | template0 | postgres | SQL_ASCII | C | C | =c/postgres...