Re: Reorganize GUC structs
Heikki Linnakangas <hlinnaka@iki.fi>
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Peter Eisentraut <peter@eisentraut.org>, Álvaro Herrera <alvherre@kurilemu.de>, John Naylor <johncnaylorls@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-10-24T12:21:17Z
Lists: pgsql-hackers
> @@ -261,15 +261,15 @@ static bool assignable_custom_variable_name(const char *name, bool skip_errors, > int elevel); > static void do_serialize(char **destptr, Size *maxbytes, > const char *fmt,...) pg_attribute_printf(3, 4); > -static bool call_bool_check_hook(const struct config_bool *conf, bool *newval, > +static bool call_bool_check_hook(const struct config_generic *conf, bool *newval, > void **extra, GucSource source, int elevel); > -static bool call_int_check_hook(const struct config_int *conf, int *newval, > +static bool call_int_check_hook(const struct config_generic *conf, int *newval, > void **extra, GucSource source, int elevel); > -static bool call_real_check_hook(const struct config_real *conf, double *newval, > +static bool call_real_check_hook(const struct config_generic *conf, double *newval, > void **extra, GucSource source, int elevel); > -static bool call_string_check_hook(const struct config_string *conf, char **newval, > +static bool call_string_check_hook(const struct config_generic *conf, char **newval, > void **extra, GucSource source, int elevel); > -static bool call_enum_check_hook(const struct config_enum *conf, int *newval, > +static bool call_enum_check_hook(const struct config_generic *conf, int *newval, > void **extra, GucSource source, int elevel); The new signatures for these function are less specific than before, making them a little worse IMO. Overall +1 on the patches, despite that little drawback. - Heikki
Commits
-
Remove extraneous newlines from guc_parameters.dat
- a7f59b252a8e 19 (unreleased) landed
-
Fix NLS for incorrect GUC enum value hint message
- 0fc33b00536c 19 (unreleased) landed
-
Clean up qsort comparison function for GUC entries
- d2f24df19b7a 19 (unreleased) landed
-
Sort guc_parameters.dat alphabetically by name
- fce7c73fba4e 19 (unreleased) landed
-
Reorganize GUC structs
- a13833c35f9e 19 (unreleased) landed
-
Change config_generic.vartype to be initialized at compile time
- e1a912c86d52 19 (unreleased) landed
-
Use designated initializers for guc_tables
- 0a7bde461016 19 (unreleased) landed
-
Change reset_extra into a config_generic common field
- 5f4c3b33a976 19 (unreleased) landed
-
Add some const qualifiers
- 29dc7a668753 19 (unreleased) landed
-
Modernize some for loops
- 1a795188889c 19 (unreleased) landed