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

2022-07-20 Thread Dave Page
On Wed, 20 Jul 2022 at 16:12, Tom Lane wrote: > Alvaro Herrera writes: > > On 2022-Jul-20, Tom Lane wrote: > >> I'll try to do some research later today to identify anything else > >> we need to mark in plpgsql. I recall doing some work specifically > >> creating functions for pldebugger's use,

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

2022-07-20 Thread Tom Lane
Alvaro Herrera writes: > On 2022-Jul-20, Tom Lane wrote: >> I'll try to do some research later today to identify anything else >> we need to mark in plpgsql. I recall doing some work specifically >> creating functions for pldebugger's use, but I'll need to dig. > I suppose you're probably thinki

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

2022-07-20 Thread Andres Freund
Hi, On July 20, 2022 4:20:04 PM GMT+02:00, Tom Lane wrote: >Alvaro Herrera 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'

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

2022-07-20 Thread Tom Lane
Alvaro Herrera 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 a

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

2022-07-20 Thread Tom Lane
Andres Freund writes: > On July 20, 2022 3:54:03 PM GMT+02:00, Robert Haas > wrote: >> The name PGDLLEXPORT is actually slightly misleading, now, because >> there's no longer anything about it that is specific to DLLs. > How so? Right now it's solely used for making symbols in DLLs as exported?

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

2022-07-20 Thread Andres Freund
Hi, On July 20, 2022 3:54:03 PM GMT+02:00, Robert Haas wrote: >On Wed, Jul 20, 2022 at 9:39 AM Tom Lane wrote: >> ISTM that a comment pointing out that the functions marked PGDLLEXPORT >> are meant to be externally accessible should be sufficient. > >The name PGDLLEXPORT is actually slightly mi

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

2022-07-20 Thread Tom Lane
Robert Haas writes: > On Wed, Jul 20, 2022 at 9:39 AM Tom Lane wrote: >> ISTM that a comment pointing out that the functions marked PGDLLEXPORT >> are meant to be externally accessible should be sufficient. > The name PGDLLEXPORT is actually slightly misleading, now, because > there's no longer

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

2022-07-20 Thread Alvaro Herrera
On 2022-Jul-20, Tom Lane wrote: > I'll try to do some research later today to identify anything else > we need to mark in plpgsql. I recall doing some work specifically > creating functions for pldebugger's use, but I'll need to dig. I suppose you're probably thinking of commit 53ef6c40f1e7; tha

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

2022-07-20 Thread Robert Haas
On Wed, Jul 20, 2022 at 9:39 AM Tom Lane wrote: > ISTM that a comment pointing out that the functions marked PGDLLEXPORT > are meant to be externally accessible should be sufficient. The name PGDLLEXPORT is actually slightly misleading, now, because there's no longer anything about it that is spe

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

2022-07-20 Thread Tom Lane
Alvaro Herrera writes: > No immediate plans for splitting plpgsql.h, so if anyone wants to take a > stab at that, be my guest. ISTM that a comment pointing out that the functions marked PGDLLEXPORT are meant to be externally accessible should be sufficient. I'll try to do some research later tod

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

2022-07-20 Thread Alvaro Herrera
Hello On 2022-Jul-19, Andres Freund wrote: > On 2022-07-19 16:28:07 +0200, Alvaro Herrera wrote: > > Anyway, the minimal patch that makes plpgsql_check tests pass is > > attached. > > Do you want to commit that or should I? Done. No immediate plans for splitting plpgsql.h, so if anyone wants t

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

2022-07-19 Thread Andres Freund
Hi, On 2022-07-19 08:31:49 -0700, Andres Freund wrote: > But I think we probably should err on the side of adding more > declarations, rather than the oposite. To see if there's other declarations that should be added, I used https://codesearch.debian.net/search?q=load_external_function&literal=1

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

2022-07-19 Thread Andres Freund
Hi, On 2022-07-19 16:28:07 +0200, Alvaro Herrera wrote: > Anyway, the minimal patch that makes plpgsql_check tests pass is > attached. Do you want to commit that or should I? Greetings, Andres Freund

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

2022-07-19 Thread Andres Freund
Hi, On 2022-07-19 17:37:11 +0200, Pavel Stehule wrote: > út 19. 7. 2022 v 17:31 odesílatel Andres Freund napsal: > > > Hi, > > > > On 2022-07-19 16:28:07 +0200, Alvaro Herrera wrote: > > > Anyway, the minimal patch that makes plpgsql_check tests pass is > > > attached. This seems a bit random.

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

2022-07-19 Thread Pavel Stehule
Hi út 19. 7. 2022 v 17:31 odesílatel Andres Freund napsal: > Hi, > > On 2022-07-19 16:28:07 +0200, Alvaro Herrera wrote: > > Anyway, the minimal patch that makes plpgsql_check tests pass is > > attached. This seems a bit random. Maybe it'd be better to have a > > plpgsql_internal.h with functi

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

2022-07-19 Thread Andres Freund
Hi, On 2022-07-19 16:28:07 +0200, Alvaro Herrera wrote: > Anyway, the minimal patch that makes plpgsql_check tests pass is > attached. This seems a bit random. Maybe it'd be better to have a > plpgsql_internal.h with functions that are exported only for plpgsql > itself, and keep plpgsql.h with

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

2022-07-19 Thread Pavel Stehule
Hi út 19. 7. 2022 v 16:28 odesílatel Alvaro Herrera napsal: > [ Redirecting thread to -hackers from -committers ] > > On 2022-Jul-19, Tom Lane wrote: > > > Alvaro Herrera writes: > > > > Do you just need to send a patch to add an exports.txt file to > > > src/pl/plpgsql/src/ for these functions

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

2022-07-19 Thread Julien Rouhaud
On Tue, Jul 19, 2022 at 04:28:07PM +0200, Alvaro Herrera wrote: > ... oh, and: > > $ postmaster -c shared_preload_libraries=plugin_debugger > 2022-07-19 16:27:24.006 CEST [742142] FATAL: cannot request additional > shared memory outside shmem_request_hook This has been reported multiple times (i

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

2022-07-19 Thread Alvaro Herrera
[ Redirecting thread to -hackers from -committers ] On 2022-Jul-19, Tom Lane wrote: > Alvaro Herrera writes: > > Do you just need to send a patch to add an exports.txt file to > > src/pl/plpgsql/src/ for these functions? > > The precedent of plpython says that PGDLLEXPORT markers are sufficien