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: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>,
pgsql-hackers@postgresql.org
Date: 2018-08-01T03:52:28Z
Lists: pgsql-hackers
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes: >> If your extension is relying on pg11+, or you have checked the pg >> version when constructing the makefile, you can just do: >> PG_CPPFLAGS += -I$(includedir_server)/extension/hstore >> and #include "hstore.h" will work. Tom> I remain of the opinion that it'd be smarter to do Tom> PG_CPPFLAGS += -I$(includedir_server)/extension Tom> then Tom> #include "hstore/hstore.h" Tom> This way requires fewer -I options and is far more robust against Tom> header name conflicts. Sure, it works for the simple cases like hstore, but how does it handle the case of a pgxs extension that installs more than one include file, one of which includes another? -- 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