Re: [HACKERS] replace GrantObjectType with ObjectType

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, 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-19 20:43:58
Message-ID: 20171219204358.qupjfye4zoujdzd3@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut wrote:
> On 12/15/17 17:34, Michael Paquier wrote:
> > On Sat, Dec 16, 2017 at 2:39 AM, Peter Eisentraut
> > <peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:

> > That's the whole point of not having "default" in the switches, no?
> > Any object additions would be caught at compilation time.
>
> I think the purpose of EventTriggerSupportsGrantObjectType() is to tell
> which object types are supported for event triggers. The purpose is not
> to tell which object types are supported by GRANT.
>
> The way I have written it, if GRANT gets support for a new object type,
> then event trigger support automatically happens, without having to
> update another list.

That's correct, and using a single implementation as in the posted patch
is desirable. I was not happy about having to add
EventTriggerSupportsGrantObjectType (c.f. commit 296f3a605384).

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2017-12-19 21:03:29 Re: [HACKERS] postgres_fdw: Add support for INSERT OVERRIDING clause
Previous Message Andrey Zhidenkov 2017-12-19 20:37:52 Re: genomic locus