gooderp18绿色标准版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
7.0KB

  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>SHOW</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><link rel="prev" href="sql-set-transaction.html" title="SET TRANSACTION" /><link rel="next" href="sql-start-transaction.html" title="START TRANSACTION" /></head><body><div xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">SHOW</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="sql-set-transaction.html" title="SET TRANSACTION">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="sql-commands.html" title="SQL Commands">Up</a></td><th width="60%" align="center">SQL Commands</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 12.4 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="sql-start-transaction.html" title="START TRANSACTION">Next</a></td></tr></table><hr></hr></div><div class="refentry" id="SQL-SHOW"><div class="titlepage"></div><a id="id-1.9.3.178.1" class="indexterm"></a><div class="refnamediv"><h2><span class="refentrytitle">SHOW</span></h2><p>SHOW — show the value of a run-time parameter</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
  3. SHOW <em class="replaceable"><code>name</code></em>
  4. SHOW ALL
  5. </pre></div><div class="refsect1" id="id-1.9.3.178.5"><h2>Description</h2><p>
  6. <code class="command">SHOW</code> will display the current setting of
  7. run-time parameters. These variables can be set using the
  8. <code class="command">SET</code> statement, by editing the
  9. <code class="filename">postgresql.conf</code> configuration file, through
  10. the <code class="envar">PGOPTIONS</code> environmental variable (when using
  11. <span class="application">libpq</span> or a <span class="application">libpq</span>-based
  12. application), or through command-line flags when starting the
  13. <code class="command">postgres</code> server. See <a class="xref" href="runtime-config.html" title="Chapter 19. Server Configuration">Chapter 19</a> for details.
  14. </p></div><div class="refsect1" id="id-1.9.3.178.6"><h2>Parameters</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="replaceable"><code>name</code></em></span></dt><dd><p>
  15. The name of a run-time parameter. Available parameters are
  16. documented in <a class="xref" href="runtime-config.html" title="Chapter 19. Server Configuration">Chapter 19</a> and on the <a class="xref" href="sql-set.html" title="SET"><span class="refentrytitle">SET</span></a> reference page. In
  17. addition, there are a few parameters that can be shown but not
  18. set:
  19. </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="literal">SERVER_VERSION</code></span></dt><dd><p>
  20. Shows the server's version number.
  21. </p></dd><dt><span class="term"><code class="literal">SERVER_ENCODING</code></span></dt><dd><p>
  22. Shows the server-side character set encoding. At present,
  23. this parameter can be shown but not set, because the
  24. encoding is determined at database creation time.
  25. </p></dd><dt><span class="term"><code class="literal">LC_COLLATE</code></span></dt><dd><p>
  26. Shows the database's locale setting for collation (text
  27. ordering). At present, this parameter can be shown but not
  28. set, because the setting is determined at database creation
  29. time.
  30. </p></dd><dt><span class="term"><code class="literal">LC_CTYPE</code></span></dt><dd><p>
  31. Shows the database's locale setting for character
  32. classification. At present, this parameter can be shown but
  33. not set, because the setting is determined at database creation
  34. time.
  35. </p></dd><dt><span class="term"><code class="literal">IS_SUPERUSER</code></span></dt><dd><p>
  36. True if the current role has superuser privileges.
  37. </p></dd></dl></div></dd><dt><span class="term"><code class="literal">ALL</code></span></dt><dd><p>
  38. Show the values of all configuration parameters, with descriptions.
  39. </p></dd></dl></div></div><div class="refsect1" id="id-1.9.3.178.7"><h2>Notes</h2><p>
  40. The function <code class="function">current_setting</code> produces
  41. equivalent output; see <a class="xref" href="functions-admin.html" title="9.26. System Administration Functions">Section 9.26</a>.
  42. Also, the
  43. <a class="link" href="view-pg-settings.html" title="51.86. pg_settings"><code class="structname">pg_settings</code></a>
  44. system view produces the same information.
  45. </p></div><div class="refsect1" id="id-1.9.3.178.8"><h2>Examples</h2><p>
  46. Show the current setting of the parameter <code class="varname">DateStyle</code>:
  47. </p><pre class="programlisting">
  48. SHOW DateStyle;
  49. DateStyle
  50. -----------
  51. ISO, MDY
  52. (1 row)
  53. </pre><p>
  54. </p><p>
  55. Show the current setting of the parameter <code class="varname">geqo</code>:
  56. </p><pre class="programlisting">
  57. SHOW geqo;
  58. geqo
  59. ------
  60. on
  61. (1 row)
  62. </pre><p>
  63. </p><p>
  64. Show all settings:
  65. </p><pre class="programlisting">
  66. SHOW ALL;
  67. name | setting | description
  68. -------------------------+---------+-------------------------------------------------
  69. allow_system_table_mods | off | Allows modifications of the structure of ...
  70. .
  71. .
  72. .
  73. xmloption | content | Sets whether XML data in implicit parsing ...
  74. zero_damaged_pages | off | Continues processing past damaged page headers.
  75. (196 rows)
  76. </pre></div><div class="refsect1" id="id-1.9.3.178.9"><h2>Compatibility</h2><p>
  77. The <code class="command">SHOW</code> command is a
  78. <span class="productname">PostgreSQL</span> extension.
  79. </p></div><div class="refsect1" id="id-1.9.3.178.10"><h2>See Also</h2><span class="simplelist"><a class="xref" href="sql-set.html" title="SET"><span class="refentrytitle">SET</span></a>, <a class="xref" href="sql-reset.html" title="RESET"><span class="refentrytitle">RESET</span></a></span></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="sql-set-transaction.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="sql-commands.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="sql-start-transaction.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">SET TRANSACTION </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> START TRANSACTION</td></tr></table></div></body></html>
上海开阖软件有限公司 沪ICP备12045867号-1