Re: show() function - updated patch

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: show() function - updated patch
Date: 2002-08-04 03:47:20
Message-ID: 200208040347.g743lKt29374@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Later version of patch applied. Thanks.

---------------------------------------------------------------------------

Joe Conway wrote:
> Tom Lane wrote:
> > This patch is lacking documentation additions for the newly-defined
> > functions; not to mention doc updates for the new behavior of SHOW.
> > Please supply...
>
> Here is a doc patch for the SHOW X changes and new config-settings
> functions. If there are no objections, please apply.
>
> Thanks,
>
> Joe

> Index: doc/src/sgml/ref/show.sgml
> ===================================================================
> RCS file: /opt/src/cvs/pgsql/doc/src/sgml/ref/show.sgml,v
> retrieving revision 1.17
> diff -c -r1.17 show.sgml
> *** doc/src/sgml/ref/show.sgml 17 May 2002 01:19:16 -0000 1.17
> --- doc/src/sgml/ref/show.sgml 20 Jul 2002 16:54:21 -0000
> ***************
> *** 83,89 ****
>
> <screen>
> SHOW DateStyle;
> ! INFO: DateStyle is ISO with US (NonEuropean) conventions
> </screen>
> </para>
>
> --- 83,92 ----
>
> <screen>
> SHOW DateStyle;
> ! DateStyle
> ! ---------------------------------------
> ! ISO with US (NonEuropean) conventions
> ! (1 row)
> </screen>
> </para>
>
> ***************
> *** 91,99 ****
> Show the current genetic optimizer (<literal>geqo</literal>) setting:
> <screen>
> SHOW GEQO;
> ! INFO: geqo is on
> </screen>
> </para>
> </refsect1>
>
> <refsect1 id="R1-SQL-SHOW-3">
> --- 94,125 ----
> Show the current genetic optimizer (<literal>geqo</literal>) setting:
> <screen>
> SHOW GEQO;
> ! geqo
> ! ------
> ! on
> ! (1 row)
> </screen>
> </para>
> +
> + <para>
> + Show all settings:
> + <screen>
> + 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)
> + </screen>
> + </para>
> +
> </refsect1>
>
> <refsect1 id="R1-SQL-SHOW-3">
> 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 20:34:04 -0000
> ***************
> *** 4437,4442 ****
> --- 4437,4555 ----
> </para>
>
> <table>
> + <title>Configuration Settings Information Functions</title>
> + <tgroup cols="3">
> + <thead>
> + <row><entry>Name</entry> <entry>Return Type</entry> <entry>Description</entry></row>
> + </thead>
> +
> + <tbody>
> + <row>
> + <entry>
> + <function>current_setting</function>(<parameter>setting_name</parameter>)
> + </entry>
> + <entry><type>text</type></entry>
> + <entry>value of current setting</entry>
> + </row>
> + <row>
> + <entry>
> + <function>set_config(<parameter>setting_name</parameter>,
> + <parameter>new_value</parameter>,
> + <parameter>is_local</parameter>)</function>
> + </entry>
> + <entry><type>text</type></entry>
> + <entry>new value of current setting</entry>
> + </row>
> + </tbody>
> + </tgroup>
> + </table>
> +
> + <indexterm zone="functions-misc">
> + <primary>setting</primary>
> + <secondary>current</secondary>
> + </indexterm>
> +
> + <indexterm zone="functions-misc">
> + <primary>setting</primary>
> + <secondary>set</secondary>
> + </indexterm>
> +
> + <para>
> + The <function>current_setting</function> is used to obtain the current
> + value of the <parameter>setting_name</parameter> setting, as a query
> + result. For example:
> + <programlisting>
> + select current_setting('DateStyle');
> + current_setting
> + ---------------------------------------
> + ISO with US (NonEuropean) conventions
> + (1 row)
> + </programlisting>
> + </para>
> +
> + <para>
> + <function>set_config</function> allows the <parameter>setting_name
> + </parameter> setting to be changed to <parameter>new_value</parameter>.
> + If <parameter>is_local</parameter> is set to <literal>true</literal>,
> + the new value will only apply to the current transaction. If you want
> + the new value to apply for the current session, use <literal>false</literal>
> + instead. For example:
> + <programlisting>
> + 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)
> + </programlisting>
> + </para>
> +
> + <table>
> <title>Access Privilege Inquiry Functions</title>
> <tgroup cols="3">
> <thead>

>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2002-08-04 04:07:49 Re: [PATCHES] START TRANSACTION
Previous Message Alvaro Herrera 2002-08-03 20:50:39 Re: CLUSTER patch