Re: [HACKERS] replace GrantObjectType with ObjectType - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [HACKERS] replace GrantObjectType with ObjectType
Date
Msg-id CAB7nPqSG3Xyc5w6kP4D4X8k8OaPixENMaQvJc0qkmZ_rGkKJgA@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] replace GrantObjectType with ObjectType  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: [HACKERS] replace GrantObjectType with ObjectType
List pgsql-hackers
On Sat, Dec 16, 2017 at 2:39 AM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.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


pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: "failed to find parent tuple for heap-only tuple" error as anERRCODE_DATA_CORRUPTION ereport()
Next
From: Michael Paquier
Date:
Subject: Re: genomic locus