Re: Should contrib modules install .h files?

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Michael Paquier <michael@paquier.xyz>, Stephen Frost <sfrost@snowman.net>, Andrew Gierth <andrew@tao11.riddles.org.uk>, pgsql-hackers@postgresql.org, Andres Freund <andres@anarazel.de>
Date: 2018-07-23T16:12:30Z
Lists: pgsql-hackers
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> Also, let's recall that the point of this exercise is that you want to
> install the header files so that you can build things (another
> extension) that somehow interacts with those extensions.  Then, even if
> you put things in separate directories per extension, you still need to
> make sure that all the installed header files don't clash, since you'll
> be adding the -I options of several of them.  In a way, doing it this
> way will make things less robust, since it will appear to give extension
> authors license to use generic header names.

Personally, I'd recommend using *one* -I switch and having .c files
reference extension headers with #include "extensionname/headername.h".

As I said before, I think that we should change the existing contrib
modules to be coded likewise, all using a single -I switch that points
at SRCDIR/contrib.  That'd help give people the right coding model
to follow.

			regards, tom lane


Commits

  1. Fix out-of-tree build for transform modules.

  2. Provide for contrib and pgxs modules to install include files.