Re: GUC values - recommended way to declare the C variables?

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: GUC values - recommended way to declare the C variables?
Date: 2022-10-14 03:56:13
Message-ID: Y0jd3ZNPiDQvTiMm@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 13, 2022 at 11:14:57PM -0400, Tom Lane wrote:
> Could we fix the out-of-sync risk by having InitializeGUCOptions insist
> that the pre-existing value of the variable match what is in guc_tables.c?
> That may not work for string values but I think we could insist on it
> for other GUC data types. For strings, maybe the rule could be "the
> old value must be NULL or strcmp-equal to the boot_val".

pg_strcasecmp()'d would be more flexible here? Sometimes the
character casing on the values is not entirely consistent, but no
objections to use something stricter, either.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-10-14 04:07:02 Re: GUC values - recommended way to declare the C variables?
Previous Message Tom Lane 2022-10-14 03:35:14 Re: [RFC] building postgres with meson - v13