pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: 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 17:22:16 +0200
Message-ID: <dc5ad1a1-be01-ea26-1bb1-a6313cc0fffd@2ndquadrant.com> (raw)
In-Reply-To: <21149.1532319353@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>
	<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>

On 23.07.18 06:15, Tom Lane wrote:
> Michael Paquier <michael@paquier.xyz> writes:
>> On Sun, Jul 22, 2018 at 09:42:08PM -0400, Stephen Frost wrote:
>>> So, +1 from me for having a directory for each extension.
> 
>> So, like Stephen, that's a +1 from me.
> 
> Same here.  One-file-per-extension is too strongly biased to tiny
> extensions (like most of our contrib examples).

Nobody said anything about one-file-per-extension.  You can of course
have hstore_this.h and hstore_that.h or if you want to have many, use
postgis/this.h and postgis/that.h.  That's how every C package in the
world works.  We don't need to legislate further here other than, use
sensible naming.

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.

> I don't have a real strong opinion on whether it's too late to
> push this into v11.  I do not think it'd break anything other than
> packagers' lists of files to be installed ... but it does seem
> like a new feature, and we're past feature freeze.

Certainly a new feature.  I suggest submitting it to the next commit fest.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




view thread (81+ messages)  latest in thread

Message-ID: <dc5ad1a1-be01-ea26-1bb1-a6313cc0fffd@2ndquadrant.com>
Permalink:  ../dc5ad1a1-be01-ea26-1bb1-a6313cc0fffd@2ndquadrant.com/
Also on:    postgresql.org/message-id/dc5ad1a1-be01-ea26-1bb1-a6313cc0fffd@2ndquadrant.com

 · 

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, tgl@sss.pgh.pa.us, 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: <dc5ad1a1-be01-ea26-1bb1-a6313cc0fffd@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