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

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Fix doc patch --- pg_options_to_table() returns "setof record".
Date: 2011-02-27 08:50:21
Message-ID: 201102270850.p1R8oM116725@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Andrew Dunstan wrote:
> > 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().

Ah, good point. I see you were suggesting this in the paragraph below,
which I have done with the attached patch.

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

I fixed that in the patch too.

> > Should we fix them all?
>
>
> Possibly.
>
> > I thought that column was just for data types.
> >
>
> I don't understand this sentence.

I thought you were suggesting the table column labled "Return Type". I
see what you wanted now.

> Incidentally, your example would possibly be better written as:
>
> select (pg_options_to_table(reloptions)).* from pg_class;

Wow, that looks much better:

test=> select (pg_options_to_table(reloptions)).* from pg_class;
option_name | option_value
-----------------------------+--------------
autovacuum_freeze_table_age | 10
(1 row)

Do I want to know how you figured out how to do that? :-O

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

Attachment Content-Type Size
/rtmp/options.diff text/x-diff 1.7 KB

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2011-02-27 08:50:56 pgsql: Fix markup for pg_options_to_table() to report the return column
Previous Message Heikki Linnakangas 2011-02-26 21:50:40 pgsql: Increase the default for wal_sender_delay from 200ms to 1s. Now