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

From Tom Lane
Subject Re: Should contrib modules install .h files?
Date
Msg-id 17977.1532362350@sss.pgh.pa.us
Whole thread Raw
In response to Re: Should contrib modules install .h files?  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: Should contrib modules install .h files?  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
List 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


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] logical decoding of two-phase transactions
Next
From: Andres Freund
Date:
Subject: Re: [HACKERS] logical decoding of two-phase transactions