pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Albe Laurenz <laurenz.albe@wien.gv.at>
Cc: pgsql-hackers@postgreSQL.org <pgsql-hackers@postgresql.org>
Subject: Re: Add PGDLLEXPORT to PG_FUNCTION_INFO_V1
Date: Mon, 17 Oct 2016 16:11:37 -0400
Message-ID: <10624.1476735097@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoavrtczRMQkSaLR6h_xyk8DjniiRwjG64+Yzi3vWVwS9A@mail.gmail.com>
References: <A737B7A37273E048B164557ADEF4A58B539300BD@ntex2010a.host.magwien.gv.at>
	<5586.1476276329@sss.pgh.pa.us>
	<A737B7A37273E048B164557ADEF4A58B53930279@ntex2010a.host.magwien.gv.at>
	<8027.1476279261@sss.pgh.pa.us>
	<A737B7A37273E048B164557ADEF4A58B5393033E@ntex2010a.host.magwien.gv.at>
	<10909.1476282370@sss.pgh.pa.us>
	<A737B7A37273E048B164557ADEF4A58B5393038C@ntex2010a.host.magwien.gv.at>
	<31374.1476290849@sss.pgh.pa.us>
	<1817.1476307651@sss.pgh.pa.us>
	<9601.1476309997@sss.pgh.pa.us>
	<A737B7A37273E048B164557ADEF4A58B539310FA@ntex2010a.host.magwien.gv.at>
	<CA+TgmoavrtczRMQkSaLR6h_xyk8DjniiRwjG64+Yzi3vWVwS9A@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Robert Haas <robertmhaas@gmail.com> writes:
> On Fri, Oct 14, 2016 at 10:14 AM, Albe Laurenz <laurenz.albe@wien.gv.at> wrote:
>> Actually I would say that the correct solution is to remove the function
>> declarations from all the header files in contrib, since from commit e7128e8d
>> on the functions are declared by PG_FUNCTION_INFO_V1 anyway, right?

> Right.  Why isn't that already the case?  Commit e7128e8d seems to
> have tried.  Did it just miss a bunch of cases?

That only works to the extent that there are no cross-file references to
those symbols within the extension.  If that's true for 99% or more of
them then this is probably a good way to go.  If it's only true for, say,
75%, I'm not sure we want to decimate the headers that way.  We'd end
up with something doubly ugly: both haphazard-looking lists of only
some of the symbols, and PGDLLEXPORT marks on those that remain.

As for the core problem, I wonder why we aren't recommending that
third-party modules be built using the same infrastructure contrib
uses, rather than people ginning up their own infrastructure and
then finding out the hard way that that means they need PGDLLEXPORT
marks.

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (35+ messages)  latest in thread

Message-ID: <10624.1476735097@sss.pgh.pa.us>
Permalink:  ../10624.1476735097@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/10624.1476735097@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, laurenz.albe@wien.gv.at
  Subject: Re: Add PGDLLEXPORT to PG_FUNCTION_INFO_V1
  In-Reply-To: <10624.1476735097@sss.pgh.pa.us>
  References: <A737B7A37273E048B164557ADEF4A58B539300BD@ntex2010a.host.magwien.gv.at> <5586.1476276329@sss.pgh.pa.us> <A737B7A37273E048B164557ADEF4A58B53930279@ntex2010a.host.magwien.gv.at> <8027.1476279261@sss.pgh.pa.us> <A737B7A37273E048B164557ADEF4A58B5393033E@ntex2010a.host.magwien.gv.at> <10909.1476282370@sss.pgh.pa.us> <A737B7A37273E048B164557ADEF4A58B5393038C@ntex2010a.host.magwien.gv.at> <31374.1476290849@sss.pgh.pa.us> <1817.1476307651@sss.pgh.pa.us> <9601.1476309997@sss.pgh.pa.us> <A737B7A37273E048B164557ADEF4A58B539310FA@ntex2010a.host.magwien.gv.at> <CA+TgmoavrtczRMQkSaLR6h_xyk8DjniiRwjG64+Yzi3vWVwS9A@mail.gmail.com> <10624.1476735097@sss.pgh.pa.us>

* 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