Re: Should contrib modules install .h files?
Andrew Gierth <andrew@tao11.riddles.org.uk>
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>, Peter Geoghegan <pg@bowt.ie>,
Andres Freund <andres@anarazel.de>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2018-08-02T23:31:21Z
Lists: pgsql-hackers
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes: Tom> Something that copes with different modules installing headers Tom> with the same base name. Allowing for that was the driving force Tom> for going with subdirectory-per-extension, but if we really want Tom> that to work, there seems to be no alternative but for extensions Tom> to write qualified header names (#include "hstore/hstore.h" not Tom> #include "hstore.h"). Andres, for one, seemed to think that Tom> wouldn't play nicely with PGXS, I think that was me, not Andres? But I think I was partially wrong and that it's possible that this can be made to work at least in most cases, as long as we can rely on the same-directory rule for #include "foo.h". (i.e. the first place to look is always the same directory as the file containing the #include statement). I'm going to test this now, trying to do an out-of-both-trees build of a transform function for an out-of-tree PL that uses multiple .h files. -- Andrew (irc:RhodiumToad)
Commits
-
Fix out-of-tree build for transform modules.
- f1ca5a654d5d 11.0 landed
- 60f6756f9225 12.0 landed
-
Provide for contrib and pgxs modules to install include files.
- df163230b92b 12.0 landed
- d06eebce5fa4 11.0 landed