Re: Reorganize GUC structs

2025-11-18 Thread Peter Eisentraut
On 14.11.25 12:00, Álvaro Herrera wrote: On 2025-Nov-12, Peter Eisentraut wrote: Well, that's the one, but the code actually looks like this now: while ((i = bms_next_member(atts, i)) >= 0) { attcnt++; if (attcnt > 1) appendStringInfoString(&attsbuf, _(

Re: Reorganize GUC structs

2025-11-14 Thread Álvaro Herrera
On 2025-Nov-12, Peter Eisentraut wrote: > Well, that's the one, but the code actually looks like this now: > > while ((i = bms_next_member(atts, i)) >= 0) > { > attcnt++; > if (attcnt > 1) > appendStringInfoString(&attsbuf, _(", ")); > > appendStringIn

Re: Reorganize GUC structs

2025-11-12 Thread Peter Eisentraut
On 07.11.25 16:53, Álvaro Herrera wrote: On 2025-Nov-07, Peter Eisentraut wrote: Actually, the ", " already exists in the message catalog, so adding a comment here might confuse the other site. This one? #: replication/logical/relation.c:245 #, c-format msgid ", \"%s\"" msgstr ", »%s«" It's

Re: Reorganize GUC structs

2025-11-10 Thread Peter Eisentraut
On 07.11.25 16:14, Tom Lane wrote: Peter Eisentraut writes: Here are a few more small patches to fix related things I found afterwards or in passing. Looks sane, except that the comparator could do with an extra "const" if there's enough room on the line: +const struct config_generic *ca

Re: Reorganize GUC structs

2025-11-07 Thread Álvaro Herrera
On 2025-Nov-07, Peter Eisentraut wrote: > Actually, the ", " already exists in the message catalog, so adding a > comment here might confuse the other site. This one? #: replication/logical/relation.c:245 #, c-format msgid ", \"%s\"" msgstr ", »%s«" It's different. (And warrants a comment too,

Re: Reorganize GUC structs

2025-11-07 Thread Peter Eisentraut
On 07.11.25 10:38, Álvaro Herrera wrote: On 2025-Nov-07, Peter Eisentraut wrote: @@ -3135,14 +3135,14 @@ parse_and_validate_value(const struct config_generic *record, char *hintmsg; hintmsg = config_enum_get_options(conf, -

Re: Reorganize GUC structs

2025-11-07 Thread Tom Lane
Peter Eisentraut writes: > Here are a few more small patches to fix related things I found > afterwards or in passing. Looks sane, except that the comparator could do with an extra "const" if there's enough room on the line: +const struct config_generic *ca = *(const struct config_generic *

Re: Reorganize GUC structs

2025-11-07 Thread Álvaro Herrera
On 2025-Nov-07, Peter Eisentraut wrote: > @@ -3135,14 +3135,14 @@ parse_and_validate_value(const struct config_generic > *record, > char *hintmsg; > > hintmsg = config_enum_get_options(conf, > -

Re: Reorganize GUC structs

2025-11-07 Thread Peter Eisentraut
On 03.11.25 12:16, Peter Eisentraut wrote: The remaining patches to sort the list alphabetically have also been pushed. Here are a few more small patches to fix related things I found afterwards or in passing. The first one straightens out how the qsort comparison function for GUC records w

Re: Reorganize GUC structs

2025-11-03 Thread Peter Eisentraut
On 29.10.25 10:07, Peter Eisentraut wrote: On 24.10.25 14:21, Heikki Linnakangas wrote: @@ -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

Re: Reorganize GUC structs

2025-10-29 Thread Peter Eisentraut
On 24.10.25 14:21, Heikki Linnakangas wrote: @@ -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 c

Re: Reorganize GUC structs

2025-10-24 Thread Heikki Linnakangas
@@ -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,

Re: Reorganize GUC structs

2025-10-18 Thread Peter Eisentraut
On 13.10.25 13:39, Álvaro Herrera wrote: I agree that keeping the guc_parameters.dat file alphabetically sorted by default would keep the maintenance cost lowest, because we won't have to make any subjective decisions for new entries. However, automatically generating the .sample file sounds imp

Re: Reorganize GUC structs

2025-10-18 Thread Álvaro Herrera
On 2025-Oct-13, John Naylor wrote: > On Fri, Oct 3, 2025 at 1:55 PM Peter Eisentraut wrote: > > Additionally, I have sorted guc_parameters.dat alphabetically by name, > > and have added code to enforce the sort order going forward. > > That makes sense by default. Another possibility would be to

Re: Reorganize GUC structs

2025-10-18 Thread Chao Li
> On Oct 3, 2025, at 14:55, Peter Eisentraut wrote: > > > The patches in the series are arranged so that they can be considered and > applied incrementally. > 0001 - looks good to me. Basically it only moves for loop’s loop variable type definition into for(), it isn’t tied to rest commit

Re: Reorganize GUC structs

2025-10-18 Thread John Naylor
On Fri, Oct 3, 2025 at 1:55 PM Peter Eisentraut wrote: > Additionally, I have sorted guc_parameters.dat alphabetically by name, > and have added code to enforce the sort order going forward. (Note: The That makes sense by default. Another possibility would be to keep them in the same order as po