Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fkiBr-0002uL-Ju for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Aug 2018 03:52:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fkiBo-0006zQ-Ay for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Aug 2018 03:52:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fkiBo-0006y7-40 for pgsql-hackers@lists.postgresql.org; Wed, 01 Aug 2018 03:52:44 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fkiBd-0001WA-Bu for pgsql-hackers@postgresql.org; Wed, 01 Aug 2018 03:52:40 +0000 Received: from [192.168.127.1] (port=57866 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.88 (FreeBSD)) (envelope-from ) id 1fkiBa-0001pl-Bw; Wed, 01 Aug 2018 03:52:30 +0000 Received: from [127.0.0.1] (port=25650 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.89 (FreeBSD)) (envelope-from ) id 1fkiBZ-000Js7-I7; Wed, 01 Aug 2018 03:52:29 +0000 From: Andrew Gierth To: Tom Lane Cc: Peter Eisentraut , pgsql-hackers@postgresql.org Subject: Re: Should contrib modules install .h files? In-Reply-To: <27744.1533091472@sss.pgh.pa.us> (Tom Lane's message of "Tue, 31 Jul 2018 22:44:32 -0400") Message-ID: <87600ubvb7.fsf@news-spur.riddles.org.uk> References: <87y3euomjh.fsf@news-spur.riddles.org.uk> <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> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) Date: Wed, 01 Aug 2018 04:52:28 +0100 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk >>>>> "Tom" == Tom Lane 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)