From: | Peter Smith <smithpb2250(at)gmail(dot)com> |
---|---|
To: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, Peter Eisentraut <peter(at)eisentraut(dot)org>, 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: | 2023-11-08 22:53:55 |
Message-ID: | CAHut+PtqTao+OKRxGcCzUxt9h9d0=TQZZoRjMYe3xe0-O7_hsQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Nov 8, 2023 at 7:40 AM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>
> FWIW, I am halfway through doing regex checking of the PG16 source for
> all GUC names in messages to see what current styles are in use today.
>
> Not sure if those numbers will influence the decision.
>
> I hope I can post my findings today or tomorrow.
>
Here are my findings from the current PG16 source messages.
I used a regex search:
".*GUCNAME
to find how each GUCNAME is used in the messages in *.c files.
The GUC names are taken from the guc_tables.c code, so they are
grouped accordingly below.
~TOTALS:
messages where GUC names are QUOTED:
- bool = 11
- int = 11
- real = 0
- string = 10
- enum = 7
TOTAL = 39
messages where GUC names are NOT QUOTED:
- bool = 14
- int = 60
- real = 0
- string = 59
- enum = 31
TOTAL = 164
~~~
Details are in the attached file. PSA.
I've categorised them as being currently QUOTED, NOT QUOTED, and NONE
(most are not used in any messages).
Notice that NOT QUOTED is the far more common pattern, so my vote
would be just to standardise on making everything this way. I know
there was some concern raised about ambiguous words like "timezone"
and "datestyle" etc but in practice, those are rare. Also, those GUCs
are different in that they are written as camel-case (e.g.
"DateStyle") in the guc_tables.c, so if they were also written
camel-case in the messages that could remove ambiguities with normal
words. YMMV.
Anyway, I will await a verdict about what to do.
======
Kind Regards,
Peter Smith.
Fujitsu Australia
Attachment | Content-Type | Size |
---|---|---|
20231107-guc-names-in-messages-data.txt | text/plain | 43.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2023-11-08 22:56:47 | Re: pg_upgrade and logical replication |
Previous Message | David Christensen | 2023-11-08 22:47:06 | Re: Moving forward with TDE [PATCH v3] |