1<!--
2doc/src/sgml/ref/show.sgml
3PostgreSQL documentation
4-->
5
6<refentry id="sql-show">
7 <indexterm zone="sql-show">
8  <primary>SHOW</primary>
9 </indexterm>
10
11 <refmeta>
12  <refentrytitle>SHOW</refentrytitle>
13  <manvolnum>7</manvolnum>
14  <refmiscinfo>SQL - Language Statements</refmiscinfo>
15 </refmeta>
16
17 <refnamediv>
18  <refname>SHOW</refname>
19  <refpurpose>show the value of a run-time parameter</refpurpose>
20 </refnamediv>
21
22 <refsynopsisdiv>
23<synopsis>
24SHOW <replaceable class="parameter">name</replaceable>
25SHOW ALL
26</synopsis>
27 </refsynopsisdiv>
28
29 <refsect1>
30  <title>Description</title>
31
32  <para>
33   <command>SHOW</command> will display the current setting of
34   run-time parameters. These variables can be set using the
35   <command>SET</command> statement, by editing the
36   <filename>postgresql.conf</filename> configuration file, through
37   the <envar>PGOPTIONS</envar> environmental variable (when using
38   <application>libpq</application> or a <application>libpq</application>-based
39   application), or through command-line flags when starting the
40   <command>postgres</command> server.  See <xref
41   linkend="runtime-config"/> for details.
42  </para>
43 </refsect1>
44
45 <refsect1>
46  <title>Parameters</title>
47
48  <variablelist>
49   <varlistentry>
50    <term><replaceable class="parameter">name</replaceable></term>
51    <listitem>
52     <para>
53      The name of a run-time parameter.  Available parameters are
54      documented in <xref linkend="runtime-config"/> and on the <xref
55      linkend="sql-set"/> reference page.  In
56      addition, there are a few parameters that can be shown but not
57      set:
58
59      <variablelist>
60       <varlistentry>
61        <term><literal>SERVER_VERSION</literal></term>
62        <listitem>
63         <para>
64          Shows the server's version number.
65         </para>
66        </listitem>
67       </varlistentry>
68
69       <varlistentry>
70        <term><literal>SERVER_ENCODING</literal></term>
71        <listitem>
72         <para>
73          Shows the server-side character set encoding.  At present,
74          this parameter can be shown but not set, because the
75          encoding is determined at database creation time.
76         </para>
77        </listitem>
78       </varlistentry>
79
80       <varlistentry>
81        <term><literal>LC_COLLATE</literal></term>
82        <listitem>
83         <para>
84          Shows the database's locale setting for collation (text
85          ordering).  At present, this parameter can be shown but not
86          set, because the setting is determined at database creation
87          time.
88         </para>
89        </listitem>
90       </varlistentry>
91
92       <varlistentry>
93        <term><literal>LC_CTYPE</literal></term>
94        <listitem>
95         <para>
96          Shows the database's locale setting for character
97          classification.  At present, this parameter can be shown but
98          not set, because the setting is determined at database creation
99          time.
100         </para>
101        </listitem>
102       </varlistentry>
103
104       <varlistentry>
105        <term><literal>IS_SUPERUSER</literal></term>
106        <listitem>
107         <para>
108          True if the current role has superuser privileges.
109         </para>
110        </listitem>
111       </varlistentry>
112      </variablelist></para>
113    </listitem>
114   </varlistentry>
115
116   <varlistentry>
117    <term><literal>ALL</literal></term>
118    <listitem>
119     <para>
120      Show the values of all configuration parameters, with descriptions.
121     </para>
122    </listitem>
123   </varlistentry>
124  </variablelist>
125 </refsect1>
126
127 <refsect1>
128  <title>Notes</title>
129
130  <para>
131   The function <function>current_setting</function> produces
132   equivalent output; see <xref linkend="functions-admin"/>.
133   Also, the
134   <link linkend="view-pg-settings"><structname>pg_settings</structname></link>
135   system view produces the same information.
136
137  </para>
138 </refsect1>
139
140 <refsect1>
141  <title>Examples</title>
142
143  <para>
144   Show the current setting of the parameter <varname>DateStyle</varname>:
145
146<programlisting>
147SHOW DateStyle;
148 DateStyle
149-----------
150 ISO, MDY
151(1 row)
152</programlisting>
153  </para>
154
155  <para>
156   Show the current setting of the parameter <varname>geqo</varname>:
157<programlisting>
158SHOW geqo;
159 geqo
160------
161 on
162(1 row)
163</programlisting>
164  </para>
165
166  <para>
167   Show all settings:
168<programlisting>
169SHOW ALL;
170            name         | setting |                description
171-------------------------+---------+-------------------------------------------------
172 allow_system_table_mods | off     | Allows modifications of the structure of ...
173    .
174    .
175    .
176 xmloption               | content | Sets whether XML data in implicit parsing ...
177 zero_damaged_pages      | off     | Continues processing past damaged page headers.
178(196 rows)
179</programlisting></para>
180 </refsect1>
181
182 <refsect1>
183  <title>Compatibility</title>
184
185  <para>
186   The <command>SHOW</command> command is a
187   <productname>PostgreSQL</productname> extension.
188  </para>
189 </refsect1>
190
191 <refsect1>
192  <title>See Also</title>
193
194  <simplelist type="inline">
195   <member><xref linkend="sql-set"/></member>
196   <member><xref linkend="sql-reset"/></member>
197  </simplelist>
198 </refsect1>
199
200</refentry>
201