Re: Mark all GUC variable as PGDLLIMPORT

Chapman Flack <chap@anastigmatix.net>

From: Chapman Flack <chap@anastigmatix.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Julien Rouhaud <rjuju123@gmail.com>, Andres Freund <andres@anarazel.de>, Michael Paquier <michael@paquier.xyz>, pgsql-hackers@lists.postgresql.org
Date: 2022-02-13T22:57:24Z
Lists: pgsql-hackers
On 02/13/22 15:48, Tom Lane wrote:
> much fix any worries there.  Or we could provide APIs that let an
> extension look up a "struct config_generic *" once and then fetch
> directly using that pointer.  (But I'd prefer not to, since it'd
> constrain the internals more than I think is wise.)

There is GetConfigOptionByNum already ... but I'm not sure there's
an easy way to ask "what's the num for option foo?".

GetNumConfigOptions exists, so there is a brute-force way.

Regards,
-Chap



Commits

  1. Remove PGDLLIMPORT marker from __pg_log_level

  2. Mark a few 'bbsink' related functions / variables static.

  3. Add some missing PGDLLIMPORT markings

  4. Apply PGDLLIMPORT markings broadly.

  5. Helper script to apply PGDLLIMPORT markings.

  6. Simplify declaring variables exported from libpgcommon and libpgport.