Re: pgsql: Default to hidden visibility for extension libraries where possi

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>, Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Pavel Stehule <pavel.stehule@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2022-07-20T15:05:00Z
Lists: pgsql-hackers
Hi, 

On July 20, 2022 4:20:04 PM GMT+02:00, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
>> I suppose you're probably thinking of commit 53ef6c40f1e7; that didn't
>> expose functions directly, but through plpgsql_plugin_ptr.  Maybe that
>> one does need to be made PGDLLEXPORT, since currently it isn't.
>
>Hm.  Not sure if the rules are the same for global variables as
>they are for functions, but if so, yeah ...

They're the same on the export side. On windows the rules for linking to variables are stricter (they need declspec dllimport), but that doesn't matter for dlsym style stuff.

Andres
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



Commits

  1. Add PGDLLEXPORTS to some plpgsql function declarations

  2. Default to hidden visibility for extension libraries where possible

  3. Expose a few more PL/pgSQL functions to debugger plugins.