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 i
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 | character ...
\drds [PATRN1 [PATRN2]] list per-database role settings \dRp[+] [PATTERN] list replication publications \dRs[+] [PATTERN] list replication subscriptions \ds[S+] [PATTERN] list sequences \dt[S+] [PATTERN] list tables \dT[S+] [PATTERN] list data types \du[S+] [PATTERN] list roles...
\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 ...
\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 ...
\ef[FUNCNAME[LINE]]editfunctiondefinition with external editor...Informational(options:S=show system objects,+=additional detail)\d[S+]list tables,views,and sequences \d[S+]NAME describe table,view,sequence,or index \da[S][PATTERN]list aggregates ...
List of schemas Name | Owner ---+--- accounts | postgres public | pg_database_owner 07、显示用户定义的函数 PostgreSQL 是一个功能繁重的数据库。如果您来自其他数据库(如 SQL Server),这可能会感觉有点违反直觉,因为很多讨论和培训都在谈论使用函数的陷阱,尤其是在查询性能方面。也就是说,能够快速列出...
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语句...
centos7 ssh服务连接 一、 xshell连接centos7 1、 首先,要确保CentOS7安装了 openssh-server,在终端中输入 yum list installed | grep openssh-server 2、 找到了 /etc/ssh/ 目录下的sshd服务配置文件 sshd_config,用Vim编辑器打开 3、 开启 sshd 服务,输入 sudo servic...猜...