postgres=# \df List of functionsSchema | Name | Result data type | Argument data types | Type---+---+---+---
List tables in database # \d List of relations Schema | Name | Type | Owner ---+---+---+--- public | employees | table | craig (1 row) Describe a table # \d employees Table "public.employees" Column | Type | Modifiers ---+---+--- id | integer | last_name | chara...
Tolist tables in a PostgreSQL database, you can use the\dcommand to get the basic information or the\dt+command for the detailed information about the tables (if you add + to commands, you will get additional information in the output): To describe any specific table, execute\d tablename...
\dp [PATTERN] list table, view, and sequence access privileges \drds [PATRN1 [PATRN2]] list per-database role settings \ds[S+] [PATTERN] list sequences \dt[S+] [PATTERN] list tables \dT[S+] [PATTERN] list data types \du[+] [PATTERN] list roles \dv[S+] [PATTERN] list views...
\det[+] [PATTERN] list foreign tables \deu[+] [PATTERN] list user mappings \dew[+] [PATTERN] list foreign-data wrappers \df[anptw][S+] [FUNCPTRN [TYPEPTRN ...]] list [only agg/normal/procedure/trigger/window] functions \dF[+] [PATTERN] list text search configurations ...
SELECT tablename FROM pg_tables;WHERE tablename NOT LIKE 'pg%'AND tablename NOT LIKE 'sql_%'ORDER BY tablename;列出数据库名 \l 或 SELECT datname FROM pg_database;切换数据库 \c 数据库名 1、通过命令⾏查询 \d 数据库 —— 得到所有表的名字 \d 表名 —— 得到表结构 2、通过SQL语句...
\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 ...
在10g有两种:range-hash,range-list 注意顺序,根分区只能是range分区,子分区可以是hash,或者list。 如下,创建组合分区: create table test1_1( ) ——注意没有分号。 partition by range(transaction_date) subpartition by hash(transaction_id) ——注意语法格式。
\det[+] [PATTERN] list foreign tables \des[+] [PATTERN] list foreign servers \deu[+] [PATTERN] list user mappings \dew[+] [PATTERN] list foreign-data wrappers \df[anptw][S+] [PATRN] list [only agg/normal/procedures/trigger/window] functions ...
List of schemas Name | Owner ---+--- accounts | postgres public | pg_database_owner 07、显示用户定义的函数 PostgreSQL 是一个功能繁重的数据库。如果您来自其他数据库(如 SQL Server),这可能会感觉有点违反直觉,因为很多讨论和培训都在谈论使用函数的陷阱,尤其是在查询性能方面。也就是说,能够快速列出...