Re: improved DefElem list processing - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: improved DefElem list processing
Date
Msg-id a1308c03-e682-2997-22d9-ecca54e66b22@2ndquadrant.com
Whole thread Raw
In response to Re: improved DefElem list processing  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On 8/22/16 10:28 AM, Alvaro Herrera wrote:
> Peter Eisentraut wrote:
>
>> I'm not happy that utils/acl.h has prototypes for aclchk.c, because
>> acl.h is included all over the place.  Perhaps I should make a
>> src/include/catalog/aclchk.c to clean that up.
>
> I've been bothered by that too in the past.  +1 for the cleanup.

Here is a patch for that.

It didn't quite achieve the elegance I was hoping for.  Most uses of
acl.h actually use aclchk.c functions, and the new aclchk.h must include
acl.h, so basically you end up just changing most includes of acl.h to
aclchk.h while still effectively including acl.h everywhere.  But I
think having one header file serve two separate .c files is still a
confusing pattern that is worth cleaning up.

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

Attachment

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: pg_sequence catalog
Next
From: Amit Kapila
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Change the way that LWLocks for extensions are allocated.