Re: PGDLLEXPORTing all GUCs?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PGDLLEXPORTing all GUCs?
Date: 2014-05-07 13:35:06
Message-ID: 25882.1399469706@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Craig Ringer <craig(at)2ndquadrant(dot)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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-05-07 13:44:36 Re: Wanted: jsonb on-disk representation documentation
Previous Message Magnus Hagander 2014-05-07 13:10:36 Re: Wanted: jsonb on-disk representation documentation