Re: GUC names in messages

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: 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>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: GUC names in messages
Date: 2023-11-01 20:46:52
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, 2023-11-01 at 16:12 -0400, Peter Eisentraut wrote:
> On 01.11.23 10:25, Tom Lane wrote:
> > And there's never been any
> > real clarity about whether to quote GUC names, though certainly we're
> > more likely to quote anything injected with %s. So that's why we have
> > a mishmash right now.
> I'm leaning toward not quoting GUC names. The quoting is needed in
> places where the value can be arbitrary, to avoid potential confusion.
> But the GUC names are well-known, and we wouldn't add confusing GUC
> names like "table" or "not found" in the future.

I agree for names with underscores in them. But I think that quoting
is necessary for names like "timezone" or "datestyle" that might be
mistaken for normal words. My personal preference is to always quote
GUC names, but I think it is OK not to quote GOCs whose name are
clearly not natural language words.

Laurenz Albe

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2023-11-01 21:13:03 Re: generate syscache info automatically
Previous Message Peter Eisentraut 2023-11-01 20:39:24 Re: Remove distprep