Here is a doc patch for the SHOW X changes and new config-settings
authorBruce Momjian
Sun, 4 Aug 2002 03:53:11 +0000 (03:53 +0000)
committerBruce Momjian
Sun, 4 Aug 2002 03:53:11 +0000 (03:53 +0000)
functions. If there are no objections, please apply.

Joe Conway

doc/src/sgml/func.sgml
doc/src/sgml/ref/set.sgml
doc/src/sgml/ref/show.sgml

index e36dde81b7e062a068fa153612669878f09f57f9..4703e04d0d5605b07b841aefee98be22cd6f1c69 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -4441,6 +4441,121 @@ SELECT NULLIF(value, '(none)') ...
     server's version.
    
 
+   
+    Configuration Settings Information Functions
+    
+     
+      Name Return Type Description
+     
+
+     
+      
+       
+        current_setting(setting_name)
+       
+       text
+       value of current setting
+      
+      
+       
+        set_config(setting_name,
+                             new_value,
+                             is_local)
+       
+       text
+       new value of current setting
+      
+     
+    
+   
+
+   
+    setting
+    current
+   
+
+   
+    setting
+    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
     
index 5ccb3a7a0df96b159ad44d8082a248c934a36c0b..359fb85b2ecd72606d5ee3d2651aa05e740f3254 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -495,6 +495,16 @@ SELECT CURRENT_TIMESTAMP AS today;
    
   
  
+
+  See Also
+
+  
+    The function set_config provides the equivalent
+    capability. See Miscellaneous Functions in the
+    PostgreSQL User's Guide.
+  
 
 
 
 
@@ -83,7 +83,10 @@ SHOW ALL
 
 
 SHOW DateStyle;
-INFO:  DateStyle is ISO with US (NonEuropean) conventions
+               DateStyle
+---------------------------------------
+ ISO with US (NonEuropean) conventions
+(1 row)
 
   
 
@@ -91,9 +94,32 @@ INFO:  DateStyle is ISO with US (NonEuropean) conventions
    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)
+
+  
+
  
 
  
@@ -104,6 +130,16 @@ INFO:  geqo is on
    PostgreSQL extension.
   
  
+
+  See Also
+
+  
+    The function current_setting produces equivalent
+    output. See Miscellaneous Functions in the
+    PostgreSQL User's Guide.
+