pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Should contrib modules install .h files?
Date: Wed, 01 Aug 2018 04:52:28 +0100
Message-ID: <87600ubvb7.fsf@news-spur.riddles.org.uk> (raw)
In-Reply-To: <27744.1533091472@sss.pgh.pa.us>
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>
	<87lgatohzp.fsf@news-spur.riddles.org.uk>
	<63655.1530540982@sss.pgh.pa.us>
	<87h8lhoevw.fsf@news-spur.riddles.org.uk>
	<63819.1530544945@sss.pgh.pa.us>
	<878t6to8j9.fsf@news-spur.riddles.org.uk>
	<874lhho071.fsf@news-spur.riddles.org.uk>
	<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>

>>>>> "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)




view thread (81+ messages)  latest in thread

Message-ID: <87600ubvb7.fsf@news-spur.riddles.org.uk>
Permalink:  ../87600ubvb7.fsf@news-spur.riddles.org.uk/
Also on:    postgresql.org/message-id/87600ubvb7.fsf@news-spur.riddles.org.uk

 · 

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: andrew@tao11.riddles.org.uk, tgl@sss.pgh.pa.us, peter.eisentraut@2ndquadrant.com
  Subject: Re: Should contrib modules install .h files?
  In-Reply-To: <87600ubvb7.fsf@news-spur.riddles.org.uk>

* 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