postgres=#GRANTCREATEONTABLESPACEapp_tbsTOtony;GRANTpostgres=#\db+ListoftablespacesName|Owner|Location|Accessprivileges|Options|Size|Description---+---+---+---+---+---+---app_tbs|postgres|/var/lib/pgsql/app_tbs|postgres=C/postgres+||0bytes|||tony=C/postgres|||pg_default|postgres|||46...
postgres=# \df List of functionsSchema | Name | Result data type | Argument data types | Type---+---+---+---
Operation ID: GetTables This operation gets tables from a database. Returns Represents a list of tables. Body TablesList Insert rowOperation ID: PostItem This operation inserts a new row into a table. Parameters 展开表 NameKeyRequiredTypeDescription Table name table True string Name of table ...
test=# \dfList of functionsSchema | Name | Result data type | Argument data types| Type---+---+---+---+---public | __tmp_create_user | void || funcpublic | auditlogfunc | trigger || funcpublic | copytable |
\det[+] [PATTERN] list foreign tables \des[+] [PATTERN] list foreign servers \deu[+] [PATTERN] list user mappings \dew[+] [PATTERN] list foreign-data wrappers \df[antw][S+] [PATRN] list [only agg/normal/trigger/window] functions ...
postgres@[local]:5432=#postgres@[local]:5432=#postgres@[local]:5432=#\lList of databases Name | Owner | Encoding | Collate | Ctype | Access privile ges ---+---+---+---+---+--- --- mydb | pguser | UTF8 | en_US.UTF-8 | en_US.UTF-8 | postgres | postgres...
A single PostgreSQL server can contain many databases. Let’s explore three different approaches to list databases in PostgreSQL!
)PARTITION BY LIST((ts::date)); CREATE TABLE tab_def PARTITION OF tab DEFAULT; 分区的创建一般分以下两种场景: 一、定时提前创建分区 定时提前创建分区只需一个定时任务调度工具即可实现,常见的定时任务调度工具和创建分区方法如下: 使用系统调度器,如 Crontab (Linux, Unix, etc.) 和 Task Scheduler (Win...
where abbreviated_grant_or_revoke is oneof:GRANT{{SELECT|INSERT|UPDATE|DELETE|TRUNCATE|REFERENCES|TRIGGER}[,...]|ALL[PRIVILEGES]}ONTABLESTO{[GROUP]role_name|PUBLIC}[,...][WITHGRANTOPTION]... 复制 ALTER DOMAIN 修改一个域的定义。 ALTERDOMAINname{SETDEFAULTexpression|DROPDEFAULT}ALTERDOMAINname{SE...
\d[S+] list tables, views, and sequences \d[S+] NAME describe table, view, sequence, or index \da[S] [PATTERN] list aggregates \dA[+] [PATTERN] list access methods \db[+] [PATTERN] list tablespaces \dc[S+] [PATTERN] list conversions ...