==== SHOW ==== .. container:: refentry :name: SQL-SHOW .. container:: titlepage .. container:: refnamediv .. rubric:: SHOW :name: show SHOW — 显示一个运行时参数的值 .. container:: refsynopsisdiv .. rubric:: 大纲 :name: 大纲 .. code:: synopsis SHOW name SHOW ALL .. container:: refsect1 :name: id-1.9.3.178.5 .. rubric:: 描述 :name: 描述 ``SHOW``\ 将显示运行时参数的当前设置。 这些变量可以使用\ ``SET``\ 语句、编辑 ``postgresql.conf``\ 配置参数、通过 ``PGOPTIONS``\ 环境变量(使用 libpq或者基于libpq的应用时) 或者启动\ ``postgres``\ 服务器时通过命令行 标志设置。 .. container:: refsect1 :name: id-1.9.3.178.6 .. rubric:: 参数 :name: 参数 .. container:: variablelist *``name``* 一个运行时参数的名称。 此外,有一些可以显示但不能设置的参数: .. container:: variablelist ``SERVER_VERSION`` 显示服务器的版本号。 ``SERVER_ENCODING`` 显示服务器端的字符集编码。当前,这个参数可以被显示 但不能被设置,因为该设置是在数据库创建时决定的。 ``LC_COLLATE`` 显示数据库的排序规则(文本序)的区域设置。当前, 这个参数可以被显示但不能被设置,因为该设置是在 数据库创建时决定的。 ``LC_CTYPE`` 显示数据库的字符分类的区域设置。当前, 这个参数可以被显示但不能被设置,因为该设置 是在数据库创建时决定的。 ``IS_SUPERUSER`` 如果当前角色具有超级用户特权则为真。 ``ALL`` 显示所有配置参数的值,并带有描述。 .. container:: refsect1 :name: id-1.9.3.178.7 .. rubric:: 注解 :name: 注解 函数\ ``current_setting``\ 产生等效的输出,见 `第 9.26 节 `__\ 。还有, ```pg_settings`` `__ 系统事务产生同样的信息。 .. container:: refsect1 :name: id-1.9.3.178.8 .. rubric:: 示例 :name: 示例 显示参数\ ``DateStyle``\ 的当前设置: .. code:: programlisting SHOW DateStyle; DateStyle ----------- ISO, MDY (1 row) 显示参数\ ``geqo``\ 的当前设置: .. code:: programlisting SHOW geqo; geqo ------ on (1 row) 显示所有设置: .. code:: programlisting 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) .. container:: refsect1 :name: id-1.9.3.178.9 .. rubric:: 兼容性 :name: 兼容性 ``SHOW``\ 命令是一种 PostgreSQL扩展。 .. container:: refsect1 :name: id-1.9.3.178.10 .. rubric:: 另见 :name: 另见 `SET `__, `RESET `__