Re: Mark all GUC variable as PGDLLIMPORT
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Chapman Flack <chap@anastigmatix.net>,
Julien Rouhaud <rjuju123@gmail.com>,
Michael Paquier <michael@paquier.xyz>,
pgsql-hackers@lists.postgresql.org
Date: 2022-02-13T21:05:38Z
Lists: pgsql-hackers
Andres Freund <andres@anarazel.de> writes: > On 2022-02-13 15:36:16 -0500, Chapman Flack wrote: >> Also, I think there are some options that are only represented by >> an int, float8, etc., when shown, but whose native internal form >> is something else, like a struct. I was definitely contemplating >> that you could 'subscribe' to one of those too, by passing the >> address of an appropriate struct. But of course a GetConfigOption() >> flavor could work that way too. > I have a very hard time seeing a use-case for this. Nor how it'd even work > with a struct - you can't just copy the struct contents, because of pointers > to objects etc. I don't think there really are options like this anyway. There are a couple of legacy cases like "datestyle" where something that the user sees as one GUC translates to multiple variables under the hood, so you'd have to invent a struct if you wanted to pass them through a mechanism like this. I don't have a big problem with leaving those out of any such solution, though. (I see that datestyle's underlying variables DateStyle and DateOrder are already marked PGDLLIMPORT, and that's fine with me.) A possibly more interesting case is something like search_path --- but again, there are already special-purpose APIs for accessing the interpreted value of that. regards, tom lane
Commits
-
Remove PGDLLIMPORT marker from __pg_log_level
- 8d3341266508 15.0 landed
-
Mark a few 'bbsink' related functions / variables static.
- b5f44225b833 15.0 landed
-
Add some missing PGDLLIMPORT markings
- 5edeb574285e 15.0 landed
-
Apply PGDLLIMPORT markings broadly.
- 8ec569479fc2 15.0 landed
-
Helper script to apply PGDLLIMPORT markings.
- 80900d469091 15.0 landed
-
Simplify declaring variables exported from libpgcommon and libpgport.
- e04a8059a74c 15.0 cited