SHOW
SQL - Language Statements
SHOW
show the value of a run-time parameter
SHOW name
SHOW ALL
Inputs
name
The name of a run-time parameter. See
for a list.
ALL
Show all current session parameters.
Description
SHOW will display the current setting of
run-time parameters. These variables can be set using the
SET statement, by editing the
postgresql.conf configuration file, through the
PGOPTIONS environmental variable (when using libpq
or a libpq-based application), or through
command-line flags when starting the
postmaster.
Even with autocommit> set to off>, SHOW>
does not start a new transaction block. See the
autocommit> section in for details.
Available parameters are documented in
and on the
reference page.
In addition, there are a few parameters that can be shown but not set:
SERVER_VERSION
Shows the server's version number.
SERVER_ENCODING
Shows the server-side multibyte encoding. At present, this
parameter can be shown but not set, because the encoding is
determined at database creation time.
LC_COLLATE
Shows the database's locale setting for collation (text ordering).
At present, this parameter can be shown but not set, because the
setting is determined at initdb> time.
LC_CTYPE
Shows the database's locale setting for character set considerations.
At present, this parameter can be shown but not set, because the
setting is determined at initdb> time.
Use to set the value
of settable parameters.
Diagnostics
ERROR: Option 'name'
is not recognized
Message returned if name does
not stand for a known parameter.
Notes
The function current_setting produces
equivalent output. See .
Examples
Show the current DateStyle setting:
SHOW DateStyle;
DateStyle
---------------------------------------
ISO with US (NonEuropean) conventions
(1 row)
Show whether the genetic query optimizer is enabled by displaying
the geqo setting:
SHOW GEQO;
geqo
------
on
(1 row)
Show all settings:
SHOW ALL;
name | setting
-------------------------------+---------------------------------------
australian_timezones | off
authentication_timeout | 60
checkpoint_segments | 3
.
.
.
wal_debug | 0
wal_sync_method | fdatasync
(94 rows)
Compatibility
The SHOW command is a
PostgreSQL extension.