Index: doc/src/sgml/func.sgml =================================================================== RCS file: /opt/src/cvs/pgsql/doc/src/sgml/func.sgml,v retrieving revision 1.104 diff -c -r1.104 func.sgml *** doc/src/sgml/func.sgml 24 Jun 2002 22:17:01 -0000 1.104 --- doc/src/sgml/func.sgml 20 Jul 2002 22:16:16 -0000 *************** *** 4437,4442 **** --- 4437,4557 ---- + 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: doc/src/sgml/ref/set.sgml =================================================================== RCS file: /opt/src/cvs/pgsql/doc/src/sgml/ref/set.sgml,v retrieving revision 1.62 diff -c -r1.62 set.sgml *** doc/src/sgml/ref/set.sgml 11 Jun 2002 15:41:30 -0000 1.62 --- doc/src/sgml/ref/set.sgml 20 Jul 2002 22:06:25 -0000 *************** *** 495,500 **** --- 495,510 ---- + + + See Also + + + The function set_config provides the equivalent + capability. See Miscellaneous Functions in the + PostgreSQL User's Guide. + +