Re: [HACKERS] replace GrantObjectType with ObjectType

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] replace GrantObjectType with ObjectType
Date: 2017-12-15 22:34:38
Message-ID: CAB7nPqSG3Xyc5w6kP4D4X8k8OaPixENMaQvJc0qkmZ_rGkKJgA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Dec 16, 2017 at 2:39 AM, Peter Eisentraut
<peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
> On 12/13/17 02:35, Michael Paquier wrote:
>> Patch 0001 is simply removing EventTriggerSupportsGrantObjectType(),
>> but shouldn't we keep it and return an error for objects that have no
>> GRANT support? Returning conditionally true looks like a trap waiting
>> to take someone in.
>
> I don't understand the motivation for this. It would just be two lists
> for the same thing.

Not really. What grant supports is a subset of what event triggers do.

> I think the potential for omission would be much greater that way.

That's the whole point of not having "default" in the switches, no?
Any object additions would be caught at compilation time.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-12-15 22:50:15 Re: genomic locus
Previous Message Peter Geoghegan 2017-12-15 22:31:50 "failed to find parent tuple for heap-only tuple" error as an ERRCODE_DATA_CORRUPTION ereport()