Re: [HACKERS] replace GrantObjectType with ObjectType

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
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-20 16:19:19
Message-ID: d284375d-89f0-16ea-6495-dab3fe39219c@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

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.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
v3-0001-Replace-GrantObjectType-with-ObjectType.patch text/plain 52.4 KB
v3-0002-Replace-AclObjectKind-with-ObjectType.patch text/plain 119.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-12-20 16:26:21 Re: AS OF queries
Previous Message Peter Eisentraut 2017-12-20 16:17:20 Re: AS OF queries