server's version.
+
+
Configuration Settings Information Functions
+
+
+ Name Return Type Description
+
+
+
+ |
+
+
current_setting(
setting_name)
+
+ text
+ value of current setting
+
+ |
+
+
set_config(setting_name,
+
+ text
+ new value of current setting
+
+
+
+
+
+
+ current
+
+
+
+ set
+
+
+ The current_setting is used to obtain the current
+ value of the
setting_name setting, as a query
+ result. It is the equivalent to the SQL SHOW command.
+ For example:
+select current_setting('DateStyle');
+ current_setting
+---------------------------------------
+ ISO with US (NonEuropean) conventions
+(1 row)
+
+
+
+
set_config allows the
setting_name
+ setting to be changed to
new_value.
+ If
is_local is set to
true,
+ the new value will only apply to the current transaction. If you want
+ the new value to apply for the current session, use
+ false instead. It is the equivalent to the SQL
+ SET command. For example:
+SHOW show_query_stats;
+ show_query_stats
+------------------
+ on
+(1 row)
+
+select set_config('show_query_stats','off','f');
+ set_config
+------------
+ off
+(1 row)
+
+SHOW show_query_stats;
+ show_query_stats
+------------------
+ off
+(1 row)
+
+select set_config('show_query_stats','on','t');
+ set_config
+------------
+ on
+(1 row)
+
+SHOW show_query_stats;
+ show_query_stats
+------------------
+ off
+(1 row)
+
+BEGIN;
+BEGIN
+select set_config('show_query_stats','on','t');
+ set_config
+------------
+ on
+(1 row)
+
+SHOW show_query_stats;
+ show_query_stats
+------------------
+ on
+(1 row)
+
+COMMIT;
+COMMIT
+SHOW show_query_stats;
+ show_query_stats
+------------------
+ off
+(1 row)
+
+
+
Access Privilege Inquiry Functions
+
+
+
See Also
+
+ The function set_config provides the equivalent
+ capability. See Miscellaneous Functions in the
+ PostgreSQL User's Guide.
+
+
SHOW DateStyle;
-INFO: DateStyle is ISO with US (NonEuropean) conventions
+ DateStyle
+---------------------------------------
+ ISO with US (NonEuropean) conventions
+(1 row)
Show the current genetic optimizer (geqo) setting:
SHOW GEQO;
-INFO: geqo is on
+ geqo
+------
+ on
+(1 row)
+
+ Show all settings:
+
+SHOW ALL;
+ name | setting
+-------------------------------+---------------------------------------
+ australian_timezones | off
+ authentication_timeout | 60
+ checkpoint_segments | 3
+ .
+ .
+ .
+ wal_debug | 0
+ wal_files | 0
+ wal_sync_method | fdatasync
+(94 rows)
+
+
+
+
+
+
See Also
+
+ The function current_setting produces equivalent
+ output. See Miscellaneous Functions in the
+ PostgreSQL User's Guide.
+
+