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 1fhdRy-0001zR-Tj for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Jul 2018 16:12:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fhdRx-0007xt-Dd for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Jul 2018 16:12:41 +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 1fhdRx-0007xl-68 for pgsql-hackers@lists.postgresql.org; Mon, 23 Jul 2018 16:12:41 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fhdRq-0005I2-GY for pgsql-hackers@postgresql.org; Mon, 23 Jul 2018 16:12:40 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w6NGCU65017978; Mon, 23 Jul 2018 12:12:30 -0400 From: Tom Lane To: Peter Eisentraut cc: Michael Paquier , Stephen Frost , Andrew Gierth , pgsql-hackers@postgresql.org, Andres Freund Subject: Re: Should contrib modules install .h files? In-reply-to: References: <87y3euomjh.fsf@news-spur.riddles.org.uk> <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> Comments: In-reply-to Peter Eisentraut message dated "Mon, 23 Jul 2018 17:22:16 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <17976.1532362350.1@sss.pgh.pa.us> Date: Mon, 23 Jul 2018 12:12:30 -0400 Message-ID: <17977.1532362350@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Peter Eisentraut 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