]> granicus.if.org Git - postgresql/blob - doc/src/sgml/ref/show.sgml
85dbfdcedcc911b65b408abdd9861a19f024abcd
[postgresql] / doc / src / sgml / ref / show.sgml
1 <!--
2 $PostgreSQL: pgsql/doc/src/sgml/ref/show.sgml,v 1.35 2004/01/06 17:26:23 neilc Exp $
3 PostgreSQL documentation
4 -->
5
6 <refentry id="SQL-SHOW">
7  <refmeta>
8   <refentrytitle id="SQL-SHOW-TITLE">SHOW</refentrytitle>
9   <refmiscinfo>SQL - Language Statements</refmiscinfo>
10  </refmeta>
11
12  <refnamediv>
13   <refname>SHOW</refname>
14   <refpurpose>show the value of a run-time parameter</refpurpose>
15  </refnamediv>
16
17  <indexterm zone="sql-show">
18   <primary>SHOW</primary>
19  </indexterm>
20
21  <refsynopsisdiv>
22 <synopsis>
23 SHOW <replaceable class="PARAMETER">name</replaceable>
24 SHOW ALL
25 </synopsis>
26  </refsynopsisdiv>
27
28  <refsect1>
29   <title>Description</title>
30
31   <para>
32    <command>SHOW</command> will display the current setting of
33    run-time parameters. These variables can be set using the
34    <command>SET</command> statement, by editing the
35    <filename>postgresql.conf</filename> configuration file, through
36    the <envar>PGOPTIONS</envar> environmental variable (when using
37    <application>libpq</> or a <application>libpq</>-based
38    application), or through command-line flags when starting the
39    <command>postmaster</command>.  See <xref
40    linkend="runtime-config"> for details.
41   </para>
42  </refsect1>
43
44  <refsect1>
45   <title>Parameters</title>
46
47   <variablelist>
48    <varlistentry>
49     <term><replaceable class="PARAMETER">name</replaceable></term>
50     <listitem>
51      <para>
52       The name of a run-time parameter.  Available parameters are
53       documented in <xref linkend="runtime-config"> and on the <xref
54       linkend="SQL-SET" endterm="SQL-SET-title"> reference page.  In
55       addition, there are a few parameters that can be shown but not
56       set:
57
58       <variablelist>
59        <varlistentry>
60         <term><literal>SERVER_VERSION</literal></term>
61         <listitem>
62          <para>
63           Shows the server's version number.
64          </para>
65         </listitem>
66        </varlistentry>
67
68        <varlistentry>
69         <term><literal>SERVER_ENCODING</literal></term>
70         <listitem>
71          <para>
72           Shows the server-side character set encoding.  At present,
73           this parameter can be shown but not set, because the
74           encoding is determined at database creation time.
75          </para>
76         </listitem>
77        </varlistentry>
78
79        <varlistentry>
80         <term><literal>LC_COLLATE</literal></term>
81         <listitem>
82          <para>
83           Shows the database's locale setting for collation (text
84           ordering).  At present, this parameter can be shown but not
85           set, because the setting is determined at
86           <command>initdb</> time.
87          </para>
88         </listitem>
89        </varlistentry>
90
91        <varlistentry>
92         <term><literal>LC_CTYPE</literal></term>
93         <listitem>
94          <para>
95           Shows the database's locale setting for character
96           classification.  At present, this parameter can be shown but
97           not set, because the setting is determined at
98           <command>initdb</> time.
99          </para>
100         </listitem>
101        </varlistentry>
102
103        <varlistentry>
104         <term><literal>IS_SUPERUSER</literal></term>
105         <listitem>
106          <para>
107           True if the current session authorization identifier has
108           superuser privileges.
109          </para>
110         </listitem>
111        </varlistentry>
112       </variablelist>
113      </para>
114     </listitem>
115    </varlistentry>
116
117    <varlistentry>
118     <term><literal>ALL</literal></term>
119     <listitem>
120      <para>
121       Show the values of all configurations parameters.
122      </para>
123     </listitem>
124    </varlistentry>
125   </variablelist>
126  </refsect1>
127
128  <refsect1>
129   <title>Notes</title>
130
131   <para>
132    The function <function>current_setting</function> produces
133    equivalent output. See <xref linkend="functions-misc">.
134   </para>
135  </refsect1>
136
137  <refsect1>
138   <title>Examples</title>
139
140   <para>
141    Show the current setting of the parameter <varname>DateStyle</varname>:
142
143 <programlisting>
144 SHOW DateStyle;
145  DateStyle
146 -----------
147  ISO, MDY
148 (1 row)
149 </programlisting>
150   </para>
151
152   <para>
153    Show the current setting of the parameter <varname>geqo</varname>:
154 <programlisting>
155 SHOW geqo;
156  geqo
157 ------
158  on
159 (1 row)
160 </programlisting>
161   </para>
162
163   <para>
164    Show all settings:
165 <programlisting>
166 SHOW ALL;
167              name              |                setting
168 -------------------------------+---------------------------------------
169  australian_timezones          | off
170  authentication_timeout        | 60
171  checkpoint_segments           | 3
172     .
173     .
174     .
175  wal_debug                     | off
176  wal_sync_method               | fdatasync
177 (94 rows)
178 </programlisting>
179   </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" endterm="SQL-SET-title"></member>
196   </simplelist>
197  </refsect1>
198
199 </refentry>
200
201 <!-- Keep this comment at the end of the file
202 Local variables:
203 mode: sgml
204 sgml-omittag:nil
205 sgml-shorttag:t
206 sgml-minimize-attributes:nil
207 sgml-always-quote-attributes:t
208 sgml-indent-step:1
209 sgml-indent-data:t
210 sgml-parent-document:nil
211 sgml-default-dtd-file:"../reference.ced"
212 sgml-exposed-tags:nil
213 sgml-local-catalogs:"/usr/lib/sgml/catalog"
214 sgml-local-ecat-files:nil
215 End:
216 -->