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

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

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

\dd

显示 constraint 、 operator class 、 operator family 、 rule 和 trigger 类型对象的描述。其他注释可通过对应对象类型的反斜线命令查看。

当前查看 PostgreSQL 18.6。

说明

显示 constraint 、 operator class 、 operator family 、 rule 和 trigger 类型对象的描述。其他注释可通过对应对象类型的反斜线命令查看。

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

用法

\dd[Sx] [ pattern ]

本版手册中的写法

命令手册中的后缀修饰符
\ddSx

手册定义

\dd[Sx] [ pattern ]

显示constraint、operator class、operator family、rule和 trigger类型对象的描述。其他注释可通过对应对象类型的反斜线命令查看。

\dd 显示与 pattern 匹配的对象描述;如果没有给出参数,则显示相应类型的可见对象的描述。但无论哪种情况,只列出那些已有描述的对象。默认情况下,只显示用户创建的对象;提供模式或 S 修饰符可包括系统对象。如果在命令名后追加 x,结果会以扩展模式显示。

可以使用 COMMENT SQL 命令创建对象的描述。

相关条目

文档与源码

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

版本比较

PostgreSQL 17 → 18: 属性变化。

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

--- PostgreSQL 17
+++ PostgreSQL 18
@@ -1,12 +1,12 @@
 {
-  "definition": "Shows the descriptions of objects of type constraint , operator class , operator family , rule , and trigger . All other comments may be viewed by the respective backslash commands for those object types. \\dd displays descriptions for objects matching the pattern , or of visible objects of the appropriate type if no argument is given. But in either case, only objects that have a description are listed. By default, only user-created objects are shown; supply a pattern or the S modifier to include system objects. Descriptions for objects can be created with the COMMENT SQL command.",
+  "definition": "Shows the descriptions of objects of type constraint , operator class , operator family , rule , and trigger . All other comments may be viewed by the respective backslash commands for those object types. \\dd displays descriptions for objects matching the pattern , or of visible objects of the appropriate type if no argument is given. But in either case, only objects that have a description are listed. By default, only user-created objects are shown; supply a pattern or the S modifier to include system objects. If x is appended to the command name, the results are displayed in expanded mode. Descriptions for objects can be created with the COMMENT SQL command.",
   "modifiers": [
     {
       "command": "\\dd",
-      "modifiers": "S"
+      "modifiers": "Sx"
     }
   ],
-  "signature": "\\dd[S] [ pattern ]",
+  "signature": "\\dd[Sx] [ pattern ]",
   "spellings": [
     "\\dd"
   ]

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

相关条目

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