Re: Should contrib modules install .h files? - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: Should contrib modules install .h files?
Date
Msg-id 87d0w5oekn.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: Should contrib modules install .h files?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:

 Tom> BTW, it's somewhat interesting to think about whether we ought to
 Tom> change the coding conventions so that extensions refer to their
 Tom> own headers with a subdirectory, e.g., #include "bloom/bloom.h".
 Tom> Having done that, all of contrib could build with a single
 Tom> centrally-provided -I switch pointing at BUILDDIR/contrib/, and
 Tom> there would be a path to allowing the code to build out of tree by
 Tom> pointing that common -I at $(includedir_server)/ or
 Tom> $(includedir_server)/MODULEDIR. This seems like it could be a lot
 Tom> less messy as we accrete more cross-module references.

I'm slightly skeptical of this because it could cause unexpected issues
when you rebuild (especially in the PGXS case) a module that has already
been installed; without care, you'd end up getting the module's own
headers from the installed version rather than the one being built,
which would be very bad.

-- 
Andrew (irc:RhodiumToad)


pgsql-hackers by date:

Previous
From: Ashutosh Sharma
Date:
Subject: Re: Test-cases for deferred constraints in plpgsql_transaction.sql
Next
From: Andres Freund
Date:
Subject: Re: branches_of_interest.txt