SHOW — 显示运行时参数的值
SHOW name
SHOW ALL
SHOW 将显示运行时参数的当前设置。这些变量可以使用 SET 语句、编辑 postgresql.conf 配置文件、通过 PGOPTIONS 环境变量(使用 libpq 或基于 libpq 的应用程序时)或在启动 postgres 服务器时通过命令行标志来设置。有关详细信息,请参阅 第 19 章。
函数 current_setting 产生等效的输出;请参阅 第 9.28.1 节。此外,pg_settings 系统视图也提供相同的信息。
显示参数 DateStyle 的当前设置
SHOW DateStyle; DateStyle ----------- ISO, MDY (1 row)
显示参数 geqo 的当前设置
SHOW geqo; geqo ------ on (1 row)
显示所有设置
SHOW ALL;
name | setting | description
-------------------------+---------+-------------------------------------------------
allow_system_table_mods | off | Allows modifications of the structure of ...
.
.
.
xmloption | content | Sets whether XML data in implicit parsing ...
zero_damaged_pages | off | Continues processing past damaged page headers.
(196 rows)
SHOW 命令是 PostgreSQL 的一个扩展。