Re: PGDLLEXPORTing all GUCs? - Mailing list pgsql-hackers

From Andres Freund
Subject Re: PGDLLEXPORTing all GUCs?
Date
Msg-id 20140507134500.GC13397@awork2.anarazel.de
Whole thread Raw
In response to Re: PGDLLEXPORTing all GUCs?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: PGDLLEXPORTing all GUCs?  (Craig Ringer <craig@2ndquadrant.com>)
Re: PGDLLEXPORTing all GUCs?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2014-05-07 09:35:06 -0400, Tom Lane wrote:
> Craig Ringer <craig@2ndquadrant.com> writes:
> > Is there any reason _not_ to PGDLLEXPORT all GUCs, other than cosmetic
> > concerns?
> 
> That seems morally equivalent to "is there a reason not to make every
> static variable global?".
> 
> IOW, no, I don't accept this proposition.  Every time we DLLEXPORT some
> variable, we lose the freedom to redefine it later.  So DLLEXPORT'ing GUCs
> should be on a case by case basis, just as for any other variable.  In
> some cases it might be smarter to export a wrapper function.

I think what Craig actually tries to propose is to mark all GUCs
currently exported in headers PGDLLIMPORT. Currently it's easy to have
extensions that work on sane systems but not windows. If they're already
exposed in headers I don't think changes get any harder just because thy
also can get used on windows...

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Wanted: jsonb on-disk representation documentation
Next
From: Andres Freund
Date:
Subject: Re: Wanted: jsonb on-disk representation documentation