Re: Add PGDLLEXPORT to PG_FUNCTION_INFO_V1

From: Yury Zhuravlev <u(dot)zhuravlev(at)postgrespro(dot)ru>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add PGDLLEXPORT to PG_FUNCTION_INFO_V1
Date: 2016-10-17 22:03:34
Message-ID: 37b5addc-b08f-4a2e-b34d-7e977080db07@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas wrote:
> Yeah, I don't know. For my money, decorating the function definitions
> in place seems easier than having to maintain a separate export list,
> especially if it can be hidden under the carpet using the existing
> stupid macro tricks. But I am not a Windows expert.

I suppose we should to establish politics for this case. Because any who
see this and who have experience in Windows surprised by this. For windows
any DLL it is like plugins which must use strict API for communications and
resolving symbols. The situation is that in Postgres we have not API for
extensions in the Windows terms.
In future CMake will hide all this troubles in itself but if tell in truth
I don't like this situation when any extension has access to any non-static
symbols. However time to time we meet static function that we want to
reusing in our extension and today I know only one decision - copy-paste.
Without strict politics in this case we will be time to time meet new
persons who ask this or similar question.

--
Yury Zhuravlev
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2016-10-17 22:18:25 Re: Parallel tuplesort (for parallel B-Tree index creation)
Previous Message Thomas Munro 2016-10-17 21:56:03 Re: [ADMIN] 9.5 new setting "cluster name" and logging