{"Entry":{"collection":"sql","key":"show","name":"SHOW","aliases":["show"],"metadata":{"aliases":["show"],"changed_in":["7.0","7.1","7.2"],"changes":[{"from":"6.4","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["compatibility"],"removed":[]},"status":"changed","synopsis":null,"to":"6.5"},{"from":"6.5","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["description","usage"],"removed":[]},"status":"changed","synopsis":{"added":["SHOW keyword"],"removed":["SHOW variable"]},"to":"7.0"},{"from":"7.0","purpose_changed":true,"renamed":{"from_file":"sql-show.htm","to_file":"sql-show.html"},"sections":{"added":["diagnostics","examples"],"changed":["description","compatibility"],"removed":["usage"]},"status":"changed","synopsis":{"added":["SHOW name"],"removed":["SHOW keyword"]},"to":"7.1"},{"from":"7.1","purpose_changed":true,"renamed":null,"sections":{"added":[],"changed":["examples","compatibility"],"removed":[]},"status":"changed","synopsis":{"added":["SHOW ALL"],"removed":[]},"to":"7.2"},{"from":"7.2","purpose_changed":false,"renamed":null,"sections":{"added":["see_also"],"changed":["description","diagnostics","examples"],"removed":[]},"status":"changed","synopsis":null,"to":"7.3"},{"from":"7.3","purpose_changed":false,"renamed":null,"sections":{"added":["parameters","notes"],"changed":["description","examples","see_also"],"removed":["diagnostics"]},"status":"changed","synopsis":null,"to":"7.4"},{"from":"7.4","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["parameters","notes","examples","see_also"],"removed":[]},"status":"changed","synopsis":null,"to":"8.0"},{"from":"8.0","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["description","parameters","examples"],"removed":[]},"status":"changed","synopsis":null,"to":"8.1"},{"from":"8.1","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["description","examples"],"removed":[]},"status":"changed","synopsis":null,"to":"8.2"},{"from":"8.2","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["description","parameters","notes","examples"],"removed":[]},"status":"changed","synopsis":null,"to":"8.3"},{"from":"8.3","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["parameters","notes"],"removed":[]},"status":"changed","synopsis":null,"to":"8.4"},{"from":"8.4","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["examples"],"removed":[]},"status":"changed","synopsis":null,"to":"9.0"},{"from":"9.1","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["notes"],"removed":[]},"status":"changed","synopsis":null,"to":"9.2"},{"from":"9.5","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["description","parameters"],"removed":[]},"status":"changed","synopsis":null,"to":"9.6"},{"from":"12","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["notes"],"removed":[]},"status":"changed","synopsis":null,"to":"13"},{"from":"13","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["description","parameters"],"removed":[]},"status":"changed","synopsis":null,"to":"14"},{"from":"15","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["parameters"],"removed":[]},"status":"changed","synopsis":null,"to":"16"},{"from":"16","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["description","parameters","notes"],"removed":[]},"status":"changed","synopsis":null,"to":"17"},{"from":"18","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["notes"],"removed":[]},"status":"changed","synopsis":null,"to":"19"}],"content_hash":"3d7f3d3b79c68b20849ff32bf70ad2b9dcfdfe01676caa8d3a787bdc76a784f1","editorial":{},"first_version":"6.4","group":"session","imported_at":"2026-09-30T17:43:39.523593+08:00","last_version":"20","name":"SHOW","object":"","position":14005,"present_in":["6.4","6.5","7.0","7.1","7.2","7.3","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"purpose":"show the value of a run-time parameter","purpose_zh":"","related":["set","reset"],"slug":"show","source_rev":"a709ab85","synopsis":"SHOW name\nSHOW ALL","verb":"SHOW"}},"Definition":{"Collection":"sql","Key":"show","SourceDatabase":"center","Version":"18","SourceTable":"sqlcmd","SourceKey":"show","SourceRevision":"a709ab85","Facts":{"anchor":"SQL-SHOW","file":"sql-show.html","lang":"en","name":"SHOW","purpose":"show the value of a run-time parameter","purpose_zh":"","related":["set","reset"],"sections":[{"html":"\u003cp\u003e\u003ccode class=\"command\"\u003eSHOW\u003c/code\u003e will display the current setting of run-time parameters. These variables can be set using the \u003ccode class=\"command\"\u003eSET\u003c/code\u003e statement, by editing the \u003ccode class=\"filename\"\u003epostgresql.conf\u003c/code\u003e configuration file, through the \u003ccode class=\"envar\"\u003ePGOPTIONS\u003c/code\u003e environmental variable (when using \u003cspan class=\"application\"\u003elibpq\u003c/span\u003e or a \u003cspan class=\"application\"\u003elibpq\u003c/span\u003e-based application), or through command-line flags when starting the \u003ccode class=\"command\"\u003epostgres\u003c/code\u003e server. See \u003ca href=\"/docs/18/runtime-config.html\" title=\"Chapter 19. Server Configuration\"\u003eChapter 19\u003c/a\u003e for details.\u003c/p\u003e","key":"description","title":"Description"},{"html":"\u003cdiv class=\"variablelist\"\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name of a run-time parameter. Available parameters are documented in \u003ca href=\"/docs/18/runtime-config.html\" title=\"Chapter 19. Server Configuration\"\u003eChapter 19\u003c/a\u003e and on the \u003ca href=\"/docs/18/sql-set.html\" title=\"SET\"\u003e\u003cspan class=\"refentrytitle\"\u003eSET\u003c/span\u003e\u003c/a\u003e reference page. In addition, there are a few parameters that can be shown but not set:\u003c/p\u003e\u003cdiv class=\"variablelist\"\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003eSERVER_VERSION\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eShows the server's version number.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003eSERVER_ENCODING\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eShows the server-side character set encoding. At present, this parameter can be shown but not set, because the encoding is determined at database creation time.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003eIS_SUPERUSER\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eTrue if the current role has superuser privileges.\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003eALL\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eShow the values of all configuration parameters, with descriptions.\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e","key":"parameters","title":"Parameters"},{"html":"\u003cp\u003eThe function \u003ccode class=\"function\"\u003ecurrent_setting\u003c/code\u003e produces equivalent output; see \u003ca href=\"/docs/18/functions-admin.html#FUNCTIONS-ADMIN-SET\" title=\"9.28.1. Configuration Settings Functions\"\u003eSection 9.28.1\u003c/a\u003e. Also, the \u003ca href=\"/docs/18/view-pg-settings.html\" title=\"53.25. pg_settings\"\u003e\u003ccode class=\"structname\"\u003epg_settings\u003c/code\u003e\u003c/a\u003e system view produces the same information.\u003c/p\u003e","key":"notes","title":"Notes"},{"html":"\u003cp\u003eShow the current setting of the parameter \u003ccode class=\"varname\"\u003eDateStyle\u003c/code\u003e:\u003c/p\u003e\u003cpre class=\"programlisting\"\u003eSHOW DateStyle;\n DateStyle\n-----------\n ISO, MDY\n(1 row)\n\u003c/pre\u003e\u003cp\u003eShow the current setting of the parameter \u003ccode class=\"varname\"\u003egeqo\u003c/code\u003e:\u003c/p\u003e\u003cpre class=\"programlisting\"\u003eSHOW geqo;\n geqo\n------\n on\n(1 row)\n\u003c/pre\u003e\u003cp\u003eShow all settings:\u003c/p\u003e\u003cpre class=\"programlisting\"\u003eSHOW ALL;\n            name         | setting |                description\n-------------------------+---------+-------------------------------------------------\n allow_system_table_mods | off     | Allows modifications of the structure of ...\n    .\n    .\n    .\n xmloption               | content | Sets whether XML data in implicit parsing ...\n zero_damaged_pages      | off     | Continues processing past damaged page headers.\n(196 rows)\n\u003c/pre\u003e","key":"examples","title":"Examples"},{"html":"\u003cp\u003eThe \u003ccode class=\"command\"\u003eSHOW\u003c/code\u003e command is a \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e extension.\u003c/p\u003e","key":"compatibility","title":"Compatibility"},{"html":"\u003cspan class=\"simplelist\"\u003e\u003ca href=\"/wiki/sql/set/?v=18\" title=\"SET\"\u003e\u003cspan class=\"refentrytitle\"\u003eSET\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"/wiki/sql/reset/?v=18\" title=\"RESET\"\u003e\u003cspan class=\"refentrytitle\"\u003eRESET\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e","key":"see_also","title":"See Also"}],"sections_same_as":"","slug":"18","synopsis_html":"SHOW \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e\nSHOW ALL","synopsis_text":"SHOW name\nSHOW ALL"},"ManualEvidence":{},"MeasuredEvidence":{}},"Text":{"Collection":"sql","Key":"show","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"SHOW","Summary":"显示一个运行时参数的值","BodyHTML":"\u003cpre\u003eSHOW name\nSHOW ALL\u003c/pre\u003e\u003csection\u003e\u003ch2\u003e描述\u003c/h2\u003e\u003cp\u003e\u003ccode\u003eSHOW\u003c/code\u003e将显示运行时参数的当前设置。这些变量可以使用\u003ccode\u003eSET\u003c/code\u003e语句来设置，也可以通过编辑 \u003ccode\u003epostgresql.conf\u003c/code\u003e配置文件、使用 \u003ccode\u003ePGOPTIONS\u003c/code\u003e环境变量（在使用 \u003cspan\u003elibpq\u003c/span\u003e或基于\u003cspan\u003elibpq\u003c/span\u003e的应用时），或者在启动\u003ccode\u003epostgres\u003c/code\u003e服务器时通过命令行标志来设置。详见\u003ca href=\"/docs/18/runtime-config.html\" rel=\"nofollow\"\u003e第 19 章\u003c/a\u003e。\u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e参数\u003c/h2\u003e\u003cdiv\u003e\u003cdl\u003e\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e运行时参数的名称。可用参数见\u003ca href=\"/docs/18/runtime-config.html\" rel=\"nofollow\"\u003e第 19 章\u003c/a\u003e以及\u003ca href=\"/docs/18/sql-set.html\" title=\"SET\" rel=\"nofollow\"\u003e\u003cspan\u003eSET\u003c/span\u003e\u003c/a\u003e参考页。此外，还有少数参数可以显示但不能设置：\u003c/p\u003e\u003cdiv\u003e\u003cdl\u003e\u003cdt\u003e\u003cspan\u003e\u003ccode\u003eSERVER_VERSION\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e显示服务器的版本号。\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003ccode\u003eSERVER_ENCODING\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e显示服务器端字符集编码。目前，这个参数可以显示但不能设置，因为该编码是在创建数据库时确定的。\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003ccode\u003eIS_SUPERUSER\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e如果当前角色具有超级用户权限，则为真。\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003ccode\u003eALL\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e显示所有配置参数的值及其描述。\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e注解\u003c/h2\u003e\u003cp\u003e函数\u003ccode\u003ecurrent_setting\u003c/code\u003e也会产生等效的输出，见\u003ca href=\"/docs/18/functions-admin.html#FUNCTIONS-ADMIN-SET\" rel=\"nofollow\"\u003e第 9.28.1 节\u003c/a\u003e。另外，\u003ca href=\"/docs/18/view-pg-settings.html\" rel=\"nofollow\"\u003e\u003ccode\u003epg_settings\u003c/code\u003e\u003c/a\u003e 系统视图也会给出相同的信息。\u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e示例\u003c/h2\u003e\u003cp\u003e显示参数\u003ccode\u003eDateStyle\u003c/code\u003e的当前设置：\u003c/p\u003e\u003cpre\u003eSHOW DateStyle;\n DateStyle\n-----------\n ISO, MDY\n(1 row)\n\u003c/pre\u003e\u003cp\u003e显示参数\u003ccode\u003egeqo\u003c/code\u003e的当前设置：\u003c/p\u003e\u003cpre\u003eSHOW geqo;\n geqo\n------\n on\n(1 row)\n\u003c/pre\u003e\u003cp\u003e显示所有设置：\u003c/p\u003e\u003cpre\u003eSHOW ALL;\n            name         | setting |                description\n-------------------------+---------+-------------------------------------------------\n allow_system_table_mods | off     | Allows modifications of the structure of ...\n    .\n    .\n    .\n xmloption               | content | Sets whether XML data in implicit parsing ...\n zero_damaged_pages      | off     | Continues processing past damaged page headers.\n(196 rows)\n\u003c/pre\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e兼容性\u003c/h2\u003e\u003cp\u003e\u003ccode\u003eSHOW\u003c/code\u003e命令是一种 \u003cspan\u003ePostgreSQL\u003c/span\u003e扩展。\u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e另见\u003c/h2\u003e\u003cspan\u003e\u003ca href=\"/wiki/sql/set/?v=18\" title=\"SET\" rel=\"nofollow\"\u003e\u003cspan\u003eSET\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"/wiki/sql/reset/?v=18\" title=\"RESET\" rel=\"nofollow\"\u003e\u003cspan\u003eRESET\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e\u003c/section\u003e","SourceRevision":"1b5ca64c","ContentHash":"4e135640eafd087efe65f4d25e39a923bc5e9464ac7e244ebacc29b5e9a21d73","Payload":{"purpose_zh":"显示一个运行时参数的值","sections":[{"html":"\u003cp\u003e\u003ccode class=\"command\"\u003eSHOW\u003c/code\u003e将显示运行时参数的当前设置。这些变量可以使用\u003ccode class=\"command\"\u003eSET\u003c/code\u003e语句来设置，也可以通过编辑 \u003ccode class=\"filename\"\u003epostgresql.conf\u003c/code\u003e配置文件、使用 \u003ccode class=\"envar\"\u003ePGOPTIONS\u003c/code\u003e环境变量（在使用 \u003cspan class=\"application\"\u003elibpq\u003c/span\u003e或基于\u003cspan class=\"application\"\u003elibpq\u003c/span\u003e的应用时），或者在启动\u003ccode class=\"command\"\u003epostgres\u003c/code\u003e服务器时通过命令行标志来设置。详见\u003ca href=\"/docs/18/runtime-config.html\" title=\"第 19 章 服务器配置\"\u003e第 19 章\u003c/a\u003e。\u003c/p\u003e","key":"description","title":"描述"},{"html":"\u003cdiv class=\"variablelist\"\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e运行时参数的名称。可用参数见\u003ca href=\"/docs/18/runtime-config.html\" title=\"第 19 章 服务器配置\"\u003e第 19 章\u003c/a\u003e以及\u003ca href=\"/docs/18/sql-set.html\" title=\"SET\"\u003e\u003cspan class=\"refentrytitle\"\u003eSET\u003c/span\u003e\u003c/a\u003e参考页。此外，还有少数参数可以显示但不能设置：\u003c/p\u003e\u003cdiv class=\"variablelist\"\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003eSERVER_VERSION\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e显示服务器的版本号。\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003eSERVER_ENCODING\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e显示服务器端字符集编码。目前，这个参数可以显示但不能设置，因为该编码是在创建数据库时确定的。\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003eIS_SUPERUSER\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e如果当前角色具有超级用户权限，则为真。\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003eALL\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e显示所有配置参数的值及其描述。\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e","key":"parameters","title":"参数"},{"html":"\u003cp\u003e函数\u003ccode class=\"function\"\u003ecurrent_setting\u003c/code\u003e也会产生等效的输出，见\u003ca href=\"/docs/18/functions-admin.html#FUNCTIONS-ADMIN-SET\" title=\"9.28.1. 配置设定函数\"\u003e第 9.28.1 节\u003c/a\u003e。另外，\u003ca href=\"/docs/18/view-pg-settings.html\" title=\"53.25. pg_settings\"\u003e\u003ccode class=\"structname\"\u003epg_settings\u003c/code\u003e\u003c/a\u003e 系统视图也会给出相同的信息。\u003c/p\u003e","key":"notes","title":"注解"},{"html":"\u003cp\u003e显示参数\u003ccode class=\"varname\"\u003eDateStyle\u003c/code\u003e的当前设置：\u003c/p\u003e\u003cpre class=\"programlisting\"\u003eSHOW DateStyle;\n DateStyle\n-----------\n ISO, MDY\n(1 row)\n\u003c/pre\u003e\u003cp\u003e显示参数\u003ccode class=\"varname\"\u003egeqo\u003c/code\u003e的当前设置：\u003c/p\u003e\u003cpre class=\"programlisting\"\u003eSHOW geqo;\n geqo\n------\n on\n(1 row)\n\u003c/pre\u003e\u003cp\u003e显示所有设置：\u003c/p\u003e\u003cpre class=\"programlisting\"\u003eSHOW ALL;\n            name         | setting |                description\n-------------------------+---------+-------------------------------------------------\n allow_system_table_mods | off     | Allows modifications of the structure of ...\n    .\n    .\n    .\n xmloption               | content | Sets whether XML data in implicit parsing ...\n zero_damaged_pages      | off     | Continues processing past damaged page headers.\n(196 rows)\n\u003c/pre\u003e","key":"examples","title":"示例"},{"html":"\u003cp\u003e\u003ccode class=\"command\"\u003eSHOW\u003c/code\u003e命令是一种 \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e扩展。\u003c/p\u003e","key":"compatibility","title":"兼容性"},{"html":"\u003cspan class=\"simplelist\"\u003e\u003ca href=\"/wiki/sql/set/?v=18\" title=\"SET\"\u003e\u003cspan class=\"refentrytitle\"\u003eSET\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"/wiki/sql/reset/?v=18\" title=\"RESET\"\u003e\u003cspan class=\"refentrytitle\"\u003eRESET\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e","key":"see_also","title":"另见"}],"sections_same_as":"","synopsis_html":"SHOW \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e\nSHOW ALL","synopsis_text":"SHOW name\nSHOW ALL"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","6.4","6.5","7.0","7.1","7.2","7.3","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
