doc: ALTER DEFAULT PRIVILEGES does not affect inherited roles
[pgsql.git] / doc / src / sgml / ref / show.sgml
blobb3747b119f9d24134c49a8a540c9b84379e57d7f
1 <!--
2 doc/src/sgml/ref/show.sgml
3 PostgreSQL documentation
4 -->
6 <refentry id="sql-show">
7 <indexterm zone="sql-show">
8 <primary>SHOW</primary>
9 </indexterm>
11 <refmeta>
12 <refentrytitle>SHOW</refentrytitle>
13 <manvolnum>7</manvolnum>
14 <refmiscinfo>SQL - Language Statements</refmiscinfo>
15 </refmeta>
17 <refnamediv>
18 <refname>SHOW</refname>
19 <refpurpose>show the value of a run-time parameter</refpurpose>
20 </refnamediv>
22 <refsynopsisdiv>
23 <synopsis>
24 SHOW <replaceable class="parameter">name</replaceable>
25 SHOW ALL
26 </synopsis>
27 </refsynopsisdiv>
29 <refsect1>
30 <title>Description</title>
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>
45 <refsect1>
46 <title>Parameters</title>
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:
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>
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>
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>
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>
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>
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>
127 <refsect1>
128 <title>Notes</title>
130 <para>
131 The function <function>current_setting</function> produces
132 equivalent output; see <xref linkend="functions-admin-set"/>.
133 Also, the
134 <link linkend="view-pg-settings"><structname>pg_settings</structname></link>
135 system view produces the same information.
137 </para>
138 </refsect1>
140 <refsect1>
141 <title>Examples</title>
143 <para>
144 Show the current setting of the parameter <varname>DateStyle</varname>:
146 <programlisting>
147 SHOW DateStyle;
148 DateStyle
149 -----------
150 ISO, MDY
151 (1 row)
152 </programlisting>
153 </para>
155 <para>
156 Show the current setting of the parameter <varname>geqo</varname>:
157 <programlisting>
158 SHOW geqo;
159 geqo
160 ------
162 (1 row)
163 </programlisting>
164 </para>
166 <para>
167 Show all settings:
168 <programlisting>
169 SHOW ALL;
170 name | setting | description
171 -------------------------+---------+-------------------------------------------------
172 allow_system_table_mods | off | Allows modifications of the structure of ...
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>
182 <refsect1>
183 <title>Compatibility</title>
185 <para>
186 The <command>SHOW</command> command is a
187 <productname>PostgreSQL</productname> extension.
188 </para>
189 </refsect1>
191 <refsect1>
192 <title>See Also</title>
194 <simplelist type="inline">
195 <member><xref linkend="sql-set"/></member>
196 <member><xref linkend="sql-reset"/></member>
197 </simplelist>
198 </refsect1>
200 </refentry>