Re: pgsql: Fix doc patch --- pg_options_to_table() returns "setof record".

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: pgsql: Fix doc patch --- pg_options_to_table() returns "setof record".
Дата
Msg-id 4D69465C.6040107@dunslane.net
обсуждение исходный текст
Ответ на Re: pgsql: Fix doc patch --- pg_options_to_table() returns "setof record".  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: pgsql: Fix doc patch --- pg_options_to_table() returns "setof record".  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-committers

On 02/26/2011 12:53 PM, Bruce Momjian wrote:
> Andrew Dunstan wrote:
>>
>> On 02/26/2011 12:27 PM, Bruce Momjian wrote:
>>> Fix doc patch --- pg_options_to_table() returns "setof record".
>> This doesn't strike me as terribly helpful. Why don't we document what
>> sort of records it returns, since we know perfectly well?:
>>
>> andrew=# \df pg_options_to_table
>>                                                           List of functions
>>      Schema   |        Name         | Result data type
>> |                        Argument data types                        |  Type
>>
------------+---------------------+------------------+-------------------------------------------------------------------+--------
>>    pg_catalog | pg_options_to_table | SETOF record     | options_array
>> text[], OUT option_name text, OUT option_value text | normal
>> (1 row)
> Well, other functions don't mention what they return either so I tried
> to be consistent.  The mention below does explain their meaning, as does
> the text next to it.

At least the description of pg_get_keywords() gives the names of the
fields, which I don't see being given for pg_options_to_table(). The
only others I see in a quick search are ts_debug(), ts_stat(),
ts_parse() and ts_token_type().

Meanwhile we seem to have lost the online developer docs at
<http://developer.postgresql.org/pgdocs/postgres/index.html> :-(

> Should we fix them all?


Possibly.

> I thought that column was just for data types.
>

I don't understand this sentence.

Incidentally, your example would possibly be better written as:

     select (pg_options_to_table(reloptions)).* from pg_class;

cheers

andrew

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: pgsql: Fix doc patch --- pg_options_to_table() returns "setof record".
Следующее
От: Andrew Dunstan
Дата:
Сообщение: pgsql: Add a configure check for Python.h if building with python.