From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: pgsql-hackers@postgresql.org, Andres Freund <andres@anarazel.de>
Subject: Re: Should contrib modules install .h files?
Date: Mon, 23 Jul 2018 12:12:30 -0400
Message-ID: <17977.1532362350@sss.pgh.pa.us> (raw)
In-Reply-To: <dc5ad1a1-be01-ea26-1bb1-a6313cc0fffd@2ndquadrant.com>
References: <87y3euomjh.fsf@news-spur.riddles.org.uk>
<ee05ea4c-3d5b-0ec6-8daa-3ec66f021076@2ndquadrant.com>
<87tvpinfr4.fsf@news-spur.riddles.org.uk>
<63444.1530537990@sss.pgh.pa.us>
<12ba9c72-504f-b911-f0ce-1dff2826fa5b@2ndquadrant.com>
<87k1q8kokq.fsf@news-spur.riddles.org.uk>
<20180723014208.GE27724@tamriel.snowman.net>
<20180723032405.GF2854@paquier.xyz>
<21149.1532319353@sss.pgh.pa.us>
<dc5ad1a1-be01-ea26-1bb1-a6313cc0fffd@2ndquadrant.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, peter.eisentraut@2ndquadrant.com, michael@paquier.xyz, sfrost@snowman.net, andrew@tao11.riddles.org.uk, andres@anarazel.de
Subject: Re: Should contrib modules install .h files?
In-Reply-To: <17977.1532362350@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox