Re: GUC names in messages

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Peter Smith <smithpb2250(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Daniel Gustafsson <daniel(at)yesql(dot)se>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: GUC names in messages
Date: 2024-05-16 11:35:29
Message-ID: aaa89c5c-7921-49cb-a939-45206c6fe289@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 04.01.24 07:53, Peter Smith wrote:
>> Now that I read this again, I think this is wrong.
>>
>> We should decide the quoting for a category, not the actual content.
>> Like, quote all file names; do not quote keywords.
>>
>> This led to the attempted patch to decide the quoting of GUC parameter
>> names dynamically based on the actual content, which no one really
>> liked. But then, to preserve consistency, we also need to be uniform in
>> quoting GUC parameter names where the name is hardcoded.
>>
>
> I agree. By attempting to define when to and when not to use quotes it
> has become overcomplicated.
>
> Earlier in the thread, I counted how quotes were used in the existing
> messages [5]; there were ~39 quoted and 164 not quoted. Based on that
> we chose to stay with the majority, and leave all the unquoted ones so
> only adding quotes "when necessary". In hindsight, that was probably
> the wrong choice because it opened a can of worms about what "when
> necessary" even means (e.g. what about underscores, mixed case etc).
>
> Certainly one simple rule "just quote everything" is easiest to follow.

I've been going through the translation updates for PG17 these days and
was led back around to this issue. It seems we left it in an
intermediate state that no one was really happy with and which is
arguably as inconsistent or more so than before.

I think we should accept your two patches

v6-0001-GUC-names-docs.patch
v6-0002-GUC-names-add-quotes.patch

which effectively everyone was in favor of and which seem to be the most
robust and sustainable solution.

(The remaining three patches from the v6 set would be PG18 material at
this point.)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2024-05-16 11:43:10 Re: Adding the extension name to EData / log_line_prefix
Previous Message Robins Tharakan 2024-05-16 10:48:43 Re: Why is parula failing?