Michael Paquier wrote: > On Thu, Oct 12, 2017 at 7:55 AM, Peter Eisentraut > <peter.eisentr...@2ndquadrant.com> wrote: > > It seems to me that having ACL_OBJECT_* symbols alongside OBJECT_* > > symbols is not useful and leads to duplication. Digging around in the > > past suggests that we used to have a lot of these command-specific > > symbols but got rid of them over time, except that the ACL stuff was > > never touched. The attached patch accomplishes that.
+1 for this. > -bool > -EventTriggerSupportsGrantObjectType(GrantObjectType objtype) > -{ > - switch (objtype) > - { > - case ACL_OBJECT_DATABASE: > - case ACL_OBJECT_TABLESPACE: > - /* no support for global objects */ > - return false; > By removing that, if any GRANT/REVOKE support is added for another > object type, then EventTriggerSupportsObjectType would return true by > default instead of getting a compilation failure. Yeah, we've found it useful to remove default: clauses in some switch blocks so that we get compile warnings when we forget to add a new type (c.f. commit e84c0195980f). Let's not add any more of those. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers