From: Tom Lane <tgl@sss.pgh.pa.us>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Thomas Kellerer <shammat@gmx.net>
Cc: Pg Docs <pgsql-docs@lists.postgresql.org>
Subject: Re: Wrong parameter names for make_interval (Postgres 13)
Date: Mon, 05 Oct 2020 11:53:58 -0400
Message-ID: <1732017.1601913238@sss.pgh.pa.us> (raw)
In-Reply-To: <CAFj8pRBXRGRTz-hVtQfmkqCGAh9R3THhmuVsg9B4ZRfjyau3dw@mail.gmail.com>
References: <7b154ef0-9f22-90b9-7734-4bf23686695b@gmx.net>
<CAFj8pRBXRGRTz-hVtQfmkqCGAh9R3THhmuVsg9B4ZRfjyau3dw@mail.gmail.com>
Pavel Stehule <pavel.stehule@gmail.com> writes:
> po 5. 10. 2020 v 15:56 odesÃlatel Thomas Kellerer <shammat@gmx.net> napsal:
>> So instead of
>> make_interval ( [ year int [, month int [, week int [, day int [, hour
>> int [, min int [, sec double precision ]]]]]]] )
>> it should be
>> make_interval ( [ years int [, months int [, weeks int [, days int
>> [,hours int [, mins int [, secs double precision ]]]]]]] )
Right, fixed.
> this syntax is not correct too
> It should be
> make_interval( years int default 0, month int default 0, days int
> default 0, hours int default 0, secs double precision default 0)
IIRC, I intentionally changed that in v13; the existence of the defaults
is sufficiently covered by the text "... fields, each of which can default
to zero". I think that was partly motivated by trying to get the function
signature to fit into limited space. The final docs-table design we ended
up with might allow undoing it, but I don't see any real reason to. The
other way is more verbose and not any clearer.
I spent a little bit of time scanning for other discrepancies between
func.sgml and pg_proc.proargnames, and found several, mostly though
not exclusively in the JSON functions. In these other cases, though,
I think there might be a good argument for making pg_proc fit the docs
not the other way around. In the JSON functions, for example, pg_proc
randomly has some functions calling the main JSON[B] input "target"
while others call it "from_json" or "json_in". I'm not real sure
which of those names is preferable, but inconsistency is not preferable.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: tgl@sss.pgh.pa.us, pavel.stehule@gmail.com, shammat@gmx.net, pgsql-docs@lists.postgresql.org
Subject: Re: Wrong parameter names for make_interval (Postgres 13)
In-Reply-To: <1732017.1601913238@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox