From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: P O'Toole <P.OToole@uwyo.edu>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: Weird return-value from pg_get_function_identity_arguments() on certain aggregate functions?
Date: Mon, 12 Mar 2018 18:22:13 -0400
Message-ID: <31650.1520893333@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwbMKiqHK7ac6iiwY8bfza_C80b8-WXfJ3r8ii5wVX3U2A@mail.gmail.com>
References: <BN6PR05MB3026A4A128947A1290D11DF3F8D30@BN6PR05MB3026.namprd05.prod.outlook.com>
<CAKFQuwaMpCy4cmpLriLusw=iawCUB1F0wgjH_dFpu3VXB=Wjug@mail.gmail.com>
<CAKFQuwbMKiqHK7ac6iiwY8bfza_C80b8-WXfJ3r8ii5wVX3U2A@mail.gmail.com>
"David G. Johnston" <david.g.johnston@gmail.com> writes:
>> On Mon, Mar 12, 2018 at 2:19 PM, P O'Toole <P.OToole@uwyo.edu> wrote:
>>> According to the System Information Functions docs,
>>> pg_get_function_identity_arguments(OID) should simply "get argument list
>>> to identify a function (without default values)", but one example of how it
>>> behaves strangely is that:
> In this case I'd say the supposed bug is that GRANT ON FUNCTION doesn't
> accept the signature of a valid CREATE AGGREGATE​ even though our existing
> implementation uses it as an implementation mechanism for both (i.e., we
> don't have a separate GRANT ON AGGREGATE).
The entire point of pg_get_function_identity_arguments is that it's
supposed to print the arguments in the form that would be accepted by
GRANT, as well as DROP FUNCTION and some other commands, so I'd tend
to blame pg_get_function_identity_arguments. Probably the reason
nobody has noticed up to now is a dearth of user-defined ordered-set
functions. Still, we're supposed to support such things, so we
oughta fix it.
[ pokes at it ... ] Hmm, DROP AGGREGATE will let you spell it
either way, so maybe it is indeed only GRANT that's got an issue.
If so, perhaps allowing this syntax there is an attractive fix.
In theory there might be pg_dump files out there using this syntax.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, P.OToole@uwyo.edu
Subject: Re: Weird return-value from pg_get_function_identity_arguments() on certain aggregate functions?
In-Reply-To: <31650.1520893333@sss.pgh.pa.us>
References: <BN6PR05MB3026A4A128947A1290D11DF3F8D30@BN6PR05MB3026.namprd05.prod.outlook.com> <CAKFQuwaMpCy4cmpLriLusw=iawCUB1F0wgjH_dFpu3VXB=Wjug@mail.gmail.com> <CAKFQuwbMKiqHK7ac6iiwY8bfza_C80b8-WXfJ3r8ii5wVX3U2A@mail.gmail.com> <31650.1520893333@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