Subject: pg_settings doc patch

From: Joe Conway <[email-masked]>
Date: Sat, 31 Aug 2002 16:26:01 -0700

Here is a documentation patch for the pg_settings virtual table. If 
there are no objections, please apply.

Thanks,

Joe
Index: doc/src/sgml/catalogs.sgml
===================================================================
RCS file: /opt/src/cvs/pgsql-server/doc/src/sgml/catalogs.sgml,v
retrieving revision 2.56
diff -c -r2.56 catalogs.sgml
*** doc/src/sgml/catalogs.sgml 30 Aug 2002 19:23:18 -0000 2.56
--- doc/src/sgml/catalogs.sgml 31 Aug 2002 22:46:02 -0000
***************
*** 162,167 ****
--- 162,172 ----

+ pg_settings
+ current session run-time parameters
+
+
+
pg_statistic
optimizer statistics

***************
*** 2858,2863 ****
--- 2863,2924 ----
text[]

Session defaults for run-time configuration variables
+
+
+
+

+
+
+
+
+
+

+
+
+ pg_settings virtual table allows display and update
+ of current session run-time parameters. There is one entry for each of the
+ available parameters provided by SHOW ALL. But it is
+ in a form that allows it to be joined with other relations and have a
+ selection criteria applied.
+
+
+
+ An UPDATE performed on pg_settings
+ is equivalent to executing the SET command on that named
+ parameter. The change only affects the value used by the current session. If
+ an UPDATE is issued within a transaction that is later
+ aborted, the effects of the UPDATE command disappear when
+ the transaction is rolled back. Once the surrounding transaction is
+ committed, the effects will persist until the end of the session, unless
+ overridden by another UPDATE or SET.
+
+
+

+
pg_settings Columns

+
+
+
+
+ Name
+ Type
+ References
+ Description
+
+
+
+
+
+ name
+ text
+
+ The name of a current session run-time parameter
+
+
+
+ setting
+ text
+
+ The value of a current session run-time parameter

---

From: Tom Lane <[email-masked]>
Date: Sat, 31 Aug 2002 20:36:20 -0400

> there are no objections, please apply.

pg_settings is not a system catalog, so I don't think it belongs in the
system catalogs chapter.  In fact it doesn't belong anywhere in the
Developer's Guide, since it's a user-oriented view.

I'm not sure where it *does* belong though :-(.  Right at the moment we
have no documentation of any of the predefined system views, except for
the ones that fit into the "monitoring" chapter of the Admin Guide.

I think maybe we ought to make a new chapter for system views ... but
where to put it?  User's Guide maybe?

			regards, tom lane

---

From: Joe Conway <[email-masked]>
Date: Sat, 31 Aug 2002 17:40:47 -0700

> where to put it?  User's Guide maybe?

It didn't seem to fit, but as you point out, there was no place else 
even close. I'll try to come up with something and submit another patch.

Joe

---

From: Joe Conway <[email-masked]>
Date: Sat, 31 Aug 2002 19:52:30 -0700

> where to put it?  User's Guide maybe?

What about putting pg_settings documentation at the bottom of:
   ->Administrators Guide
     ->Server run-time environment
       ->run-time configuration
just before the Planner and optimizer tuning subsection?

http://developer.postgresql.org/docs/postgres/runtime-config.html

I think at some point there should be a consolidated section on system 
views, but since they are scattered at the moment, this seems like the 
most logical choice to me. Comments?

Joe

---

From: "Vishnu" <[email-masked]>
Date: Sun, 1 Sep 2002 10:25:41 +0530

Dear Friend,
                  I need to access/retrieve data from multiple databases
using single query ...
 Is there any syntax ...?

 Thanks in advance

 Regards
Vishnu.