From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, 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-21 01:53:48 |
Message-ID: | CAB7nPqQ2k+1a5dQeq-p9thnn754Bd62CTJ+QO0pQAu07gxd89Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Dec 21, 2017 at 1:19 AM, Peter Eisentraut
<peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
> On 12/20/17 10:37, Alvaro Herrera wrote:
>> I think Michael's point is that instead of a "default:" clause, this
>> switch should list all the known values of the enum and throw an
>> "unsupported object type" error for them. So whenever somebody adds a
>> new object type, the compiler will complain that this switch doesn't
>> handle it and the developer will have to think about this function.
Thanks Álvaro, that's exactly the point I am coming at. The previous
version of the patch was breaking an existing flow.
> Right. I was actually looking at a later patch that I had not sent in
> yet that had already addressed that. So here it is.
Thanks for the new version. I have looked at 0001, and this looks
acceptable for me in this shape.
In the set of things that could be improved, but I am of course not
asking about those being addressed in this patch... Things could be
made more consistent for ExecGrantStmt_oids, objectNamesToOids,
objectsInSchemaToOids, SetDefaultACL and
ExecAlterDefaultPrivilegesStmt for the switch/case handlings.
I have not looked at 0002 in details.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2017-12-21 02:37:05 | Re: [HACKERS] REINDEX CONCURRENTLY 2.0 |
Previous Message | Masahiko Sawada | 2017-12-21 01:05:35 | Re: User defined data types in Logical Replication |