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-13 07:35:53
Message-ID: CAB7nPqQxu5m45n-AXQ2mKr9ujyT2LBgLNaZPC8eCmn9EWchRTQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Dec 13, 2017 at 1:46 AM, Peter Eisentraut
<peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
> OK, here is a bigger patch set that addresses these issues. I have
> added OBJECT_RELATION to reflect the difference between TABLE and
> RELATION. I have also renamed NAMESPACE to SCHEMA. And then I got rid
> of AclObjectKind as well, because it's just another enum for the same thing.
>
> This is now a bit bigger, so I'll put it in the commit fest for detailed
> review.

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 mentioned that in
https://www.postgresql.org/message-id/CAB7nPqSR8Rsh-rcMjv7_2D7oksByre4FrHUeyn_KreHgO_YUPg@mail.gmail.com
already, but this has remained unanswered.

Similarly, not using default in the switches of
stringify_adefprivs_objtype() and stringify_grantobjtype() would be
nice to grab warnings during compilation. And patch 0002 is doing it
the correct way in aclcheck_error().
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2017-12-13 07:38:10 list partition constraint shape
Previous Message Andres Freund 2017-12-13 07:30:48 Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager