pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Should contrib modules install .h files?
Date: Wed, 1 Aug 2018 08:56:47 +0200
Message-ID: <1e7bb14a-d537-2c46-1150-5c8f9d4f2a13@2ndquadrant.com> (raw )
In-Reply-To: <871sbiburm.fsf@news-spur.riddles.org.uk >
References: <67427.1530738056@sss.pgh.pa.us >
<87po02m0bh.fsf@news-spur.riddles.org.uk >
<87in5tnafh.fsf@news-spur.riddles.org.uk >
<87efghn7js.fsf@news-spur.riddles.org.uk >
<87a7r5n4n2.fsf@news-spur.riddles.org.uk >
<87o9enb4h7.fsf@news-spur.riddles.org.uk >
<86036c67-d76f-3dc0-a9f5-69e776b4ecc5@2ndquadrant.com >
<87d0v3atbm.fsf@news-spur.riddles.org.uk >
<27744.1533091472@sss.pgh.pa.us >
<87600ubvb7.fsf@news-spur.riddles.org.uk >
<20180801035515.gn45uqoqd7kwgans@alap3.anarazel.de >
<871sbiburm.fsf@news-spur.riddles.org.uk >
On 01/08/2018 06:17, Andrew Gierth wrote:
> Either way, it's a forced change to the PGXS module's file layout if it
> wants to install headers that work for other people using Tom's
> suggested approach. I'm not on board with this unless there's a better
> solution than I've seen so far.
The problem is that the way we've left it now is so that 50% of the
users will do it wrong.
This reminds me vividly of libxml headers. For example, on my system
there is a file at
/usr/include/libxml2/libxml/parser.h
How do you use that?
-I/usr/include and #include "libxml2/libxml/parser.h"
or
-I/usr/include/libxml2 and #include "libxml/parser.h"
or
-I/usr/include/libxml2/libxml and #include "parser.h"
Obviously, one can find this out with some experimentation or research,
but in our case there won't be much guidance available.
In the libxml case, the best solution is xml2-config or pkg-config. I
would like to see something similar here, where users don't have to
fiddle with PG_CPPFLAGS directly.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
view thread (81+ messages) latest in thread
Message-ID: <1e7bb14a-d537-2c46-1150-5c8f9d4f2a13@2ndquadrant.com>
Permalink: ../1e7bb14a-d537-2c46-1150-5c8f9d4f2a13@2ndquadrant.com/
Also on: postgresql.org/message-id/1e7bb14a-d537-2c46-1150-5c8f9d4f2a13@2ndquadrant.com
copy link · copy postgr.es
reply 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: peter.eisentraut@2ndquadrant.com, andrew@tao11.riddles.org.uk, andres@anarazel.de, tgl@sss.pgh.pa.us
Subject: Re: Should contrib modules install .h files?
In-Reply-To: <1e7bb14a-d537-2c46-1150-5c8f9d4f2a13@2ndquadrant.com>
* 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