↑↓ 选择 ↵ 打开 ⌫ 改范围 完整检索页

pgsql.cc 提供对 postgresql.org 官网内容的中文翻译,由 Pigsty 团队维护。

百科 / psql 命令 / 描述数据库对象

\di

在这组命令中,字母 E 、 i 、 m 、 s 、 t 和 v 分别表示外部表、索引、物化视图、序列、表和视图。你可以按任意顺序指定其中任意一个或多个字母,以获取这些类型对象的列表。例如, \dti 会列出表和索引。如果在命令名后追加 x ,结果会以扩展模式显示。如果在命令名后追加 + ,则每个对象都会连同其持久性状态(永久、临时或不记录 WAL)、磁盘上的物理大小以及相关描述(如果有)一起列出。如果指定了 pattern ,则只列出名称与模式匹配的对象。默认情况下,只显示用户创建的对象;提供…

当前查看 PostgreSQL 18.6。

说明

在这组命令中,字母 E 、 i 、 m 、 s 、 t 和 v 分别表示外部表、索引、物化视图、序列、表和视图。你可以按任意顺序指定其中任意一个或多个字母,以获取这些类型对象的列表。例如, \dti 会列出表和索引。如果在命令名后追加 x ,结果会以扩展模式显示。如果在命令名后追加 + ,则每个对象都会连同其持久性状态(永久、临时或不记录 WAL)、磁盘上的物理大小以及相关描述(如果有)一起列出。如果指定了 pattern ,则只列出名称与模式匹配的对象。默认情况下,只显示用户创建的对象;提供模式或 S 修饰符可包括系统对象。

客户端
psql 18.6
区分大小写的写法
\di

用法

\dE[Sx+] [ pattern ] \di[Sx+] [ pattern ] \dm[Sx+] [ pattern ] \ds[Sx+] [ pattern ] \dt[Sx+] [ pattern ] \dv[Sx+] [ pattern ]

本版手册中的写法

命令手册中的后缀修饰符
\dESx+
\diSx+
\dmSx+
\dsSx+
\dtSx+
\dvSx+

手册定义

\dE[Sx+] [ pattern ]
\di[Sx+] [ pattern ]
\dm[Sx+] [ pattern ]
\ds[Sx+] [ pattern ]
\dt[Sx+] [ pattern ]
\dv[Sx+] [ pattern ]

在这组命令中,字母 E、i、m、s、t 和 v 分别表示外部表、索引、物化视图、序列、表和视图。你可以按任意顺序指定其中任意一个或多个字母,以获取这些类型对象的列表。例如,\dti 会列出表和索引。如果在命令名后追加 x,结果会以扩展模式显示。如果在命令名后追加 +,则每个对象都会连同其持久性状态(永久、临时或不记录 WAL)、磁盘上的物理大小以及相关描述(如果有)一起列出。如果指定了 pattern,则只列出名称与模式匹配的对象。默认情况下,只显示用户创建的对象;提供模式或 S 修饰符可包括系统对象。

相关条目

文档与源码

来源构建
版本
18.6
构建
https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2
来源指纹
ee8d1a3612338fd9adf250730cb640fcc5233b5491337cc00a316a44e3a0b9f8

版本比较

PostgreSQL 17 → 18: 属性变化。

以下差异保留原始字段名与英文源描述。

--- PostgreSQL 17
+++ PostgreSQL 18
@@ -1,32 +1,32 @@
 {
-  "definition": "In this group of commands, the letters E , i , m , s , t , and v stand for foreign table, index, materialized view, sequence, table, and view, respectively. You can specify any or all of these letters, in any order, to obtain a listing of objects of these types. For example, \\dti lists tables and indexes. If + is appended to the command name, each object is listed with its persistence status (permanent, temporary, or unlogged), physical size on disk, and associated description if any. If pattern is specified, only objects whose names match the pattern are listed. By default, only user-created objects are shown; supply a pattern or the S modifier to include system objects.",
+  "definition": "In this group of commands, the letters E , i , m , s , t , and v stand for foreign table, index, materialized view, sequence, table, and view, respectively. You can specify any or all of these letters, in any order, to obtain a listing of objects of these types. For example, \\dti lists tables and indexes. If x is appended to the command name, the results are displayed in expanded mode. If + is appended to the command name, each object is listed with its persistence status (permanent, temporary, or unlogged), physical size on disk, and associated description if any. If pattern is specified, only objects whose names match the pattern are listed. By default, only user-created objects are shown; supply a pattern or the S modifier to include system objects.",
   "modifiers": [
     {
       "command": "\\dE",
-      "modifiers": "S+"
+      "modifiers": "Sx+"
     },
     {
       "command": "\\di",
-      "modifiers": "S+"
+      "modifiers": "Sx+"
     },
     {
       "command": "\\dm",
-      "modifiers": "S+"
+      "modifiers": "Sx+"
     },
     {
       "command": "\\ds",
-      "modifiers": "S+"
+      "modifiers": "Sx+"
     },
     {
       "command": "\\dt",
-      "modifiers": "S+"
+      "modifiers": "Sx+"
     },
     {
       "command": "\\dv",
-      "modifiers": "S+"
+      "modifiers": "Sx+"
     }
   ],
-  "signature": "\\dE[S+] [ pattern ] \\di[S+] [ pattern ] \\dm[S+] [ pattern ] \\ds[S+] [ pattern ] \\dt[S+] [ pattern ] \\dv[S+] [ pattern ]",
+  "signature": "\\dE[Sx+] [ pattern ] \\di[Sx+] [ pattern ] \\dm[Sx+] [ pattern ] \\ds[Sx+] [ pattern ] \\dt[Sx+] [ pattern ] \\dv[Sx+] [ pattern ]",
   "spellings": [
     "\\dE",
     "\\di",

比较已记录的接口与属性,排除来源指纹和构建元数据。某个样本中没有记录,不能据此判断实际引入或移除的版本。

相关条目

导出 JSON · 返回psql 命令 · 收录范围为 PostgreSQL 10 至 20;最早采样版本不一定是实际引入版本。