From: | Joe Conway <mail(at)joeconway(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: doc - add missing documentation for "acldefault" |
Date: | 2018-09-21 17:51:04 |
Message-ID: | a346e4ac-0e33-b09d-3bbf-6f7530980ab4@joeconway.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 09/19/2018 11:18 AM, Joe Conway wrote:
> On 09/19/2018 10:54 AM, Tom Lane wrote:
>> Joe Conway <mail(at)joeconway(dot)com> writes:
>>> * I do believe aclitemeq() has utility outside internal purposes.
>>
>> Our normal policy is that we do not document functions that are meant to
>> be invoked through operators. The \df output saying that is sufficient:
>
> <snip>
>
>> I would strongly object to ignoring that policy in just one place.
>
> Ok, fair enough.
>
>> Actually, it appears that most of these functions have associated
>> operators:
>>
>> # select oid::regoperator, oprcode from pg_operator where oprright = 'aclitem'::regtype;
>> oid | oprcode
>> -----------------------+-------------
>> +(aclitem[],aclitem) | aclinsert
>> -(aclitem[],aclitem) | aclremove
>> @>(aclitem[],aclitem) | aclcontains
>> =(aclitem,aclitem) | aclitemeq
>> ~(aclitem[],aclitem) | aclcontains
>> (5 rows)
>>
>> So maybe what we really need is a table of operators not functions.
>
> Good idea -- I will take a look at that.
>
>> However, I don't object to documenting any function that has its
>> own pg_description string.
Ok, so the attached version refactors/splits the group into two tables
-- operators and functions.
It drops aclinsert and aclremove entirely due to the fact that they no
longer do anything useful, to wit:
-----
Datum
aclinsert(PG_FUNCTION_ARGS)
{
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("aclinsert is no longer supported")));
PG_RETURN_NULL(); /* keep compiler quiet */
}
Datum
aclremove(PG_FUNCTION_ARGS)
{
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("aclremove is no longer supported")));
PG_RETURN_NULL(); /* keep compiler quiet */
}
-----
I also included John Naylor's patch with some minor editorialization.
Any further comments or complaints?
Thanks,
Joe
--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development
Attachment | Content-Type | Size |
---|---|---|
doc-acldefault-jec02.patch | text/x-patch | 8.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Nasby, Jim | 2018-09-21 18:45:11 | Re: How to get active table within a transaction. |
Previous Message | Andres Freund | 2018-09-21 17:43:47 | Re: pgsql: Improve autovacuum logging for aggressive and anti-wraparound ru |