Re: Should contrib modules install .h files?

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: Should contrib modules install .h files?
Date: 2018-07-02 15:15:56
Message-ID: 87d0w5oekn.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>>>> "Tom" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-07-02 15:16:15 Re: branches_of_interest.txt
Previous Message Ashutosh Sharma 2018-07-02 15:11:26 Re: Test-cases for deferred constraints in plpgsql_transaction.sql