Re: TODO: You can alter it, but you can't view it

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: TODO: You can alter it, but you can't view it
Дата
Msg-id 201102261749.p1QHnS824697@momjian.us
обсуждение исходный текст
Ответ на TODO: You can alter it, but you can't view it  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-hackers
bruce wrote:
> Josh Berkus wrote:
> >
> > > Right now pg_options_to_table() is not documented.  Should it be?
> >
> > Yes, I think so.
>
> Done, with the attached, applied patch.

Oh, here is an example usage:

    test=> select pg_options_to_table(reloptions) from pg_class;
           pg_options_to_table
    ----------------------------------
     (fillfactor,50)
     (autovacuum_freeze_table_age,10)
    (2 rows)

It also works for pg_attribute.attoptions, so I documented that too.
I also fixed the documented return type in my previous patch.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index edb7795..9c8e19f 100644
*** a/doc/src/sgml/func.sgml
--- b/doc/src/sgml/func.sgml
*************** SELECT pg_type_is_visible('myschema.widg
*** 13385,13392 ****
        </row>
        <row>
         <entry><literal><function>pg_options_to_table(<parameter>reloptions</parameter>)</function></literal></entry>
!        <entry><type>name, option</type></entry>
!        <entry>get the set of option name/value pairs from <structname>pg_class</>.<structfield>reloptions</></entry>
        </row>
        <row>

<entry><literal><function>pg_tablespace_databases(<parameter>tablespace_oid</parameter>)</function></literal></entry>
--- 13385,13392 ----
        </row>
        <row>
         <entry><literal><function>pg_options_to_table(<parameter>reloptions</parameter>)</function></literal></entry>
!        <entry><type>setof record</type></entry>
!        <entry>get the set of storage option name/value pairs</></entry>
        </row>
        <row>

<entry><literal><function>pg_tablespace_databases(<parameter>tablespace_oid</parameter>)</function></literal></entry>
*************** SELECT pg_type_is_visible('myschema.widg
*** 13484,13492 ****
    </para>

    <para>
!    <function>pg_options_to_table</function> returns the set of option
     name/value pairs when passed
!    <structname>pg_class</>.<structfield>reloptions</>.
    </para>

    <para>
--- 13484,13493 ----
    </para>

    <para>
!    <function>pg_options_to_table</function> returns the set of storage option
     name/value pairs when passed
!    <structname>pg_class</>.<structfield>reloptions</> or
!    <structname>pg_attribute</>.<structfield>attoptions</>.
    </para>

    <para>

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: wCTE: why not finish sub-updates at the end, not the beginning?
Следующее
От: PostgreSQL - Hans-Jürgen Schönig
Дата:
Сообщение: Re: WIP: cross column correlation ...