public inbox for [email protected]  
help / color / mirror / Atom feed
From: Michael Paquier <[email protected]>
To: Peter Eisentraut <[email protected]>
Cc: Peter Smith <[email protected]>
Cc: Alvaro Herrera <[email protected]>
Cc: Nathan Bossart <[email protected]>
Cc: Laurenz Albe <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Daniel Gustafsson <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: GUC names in messages
Date: Sat, 16 Dec 2023 10:33:45 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CAHut+PsXEqjxdvR6sZX6ihgWhK8jwk=L7VJdAJJT+hwAVwwj7w@mail.gmail.com>
	<[email protected]>
	<CAHut+PtOqRPyVuX=xL=EhDAEWkpBh2MgeSW1KoyMjru-tEWO9w@mail.gmail.com>
	<CAHut+PusWzeZBcOnn07m8TLHJBRiD8HCOV8QPwOwagFv3fs4kA@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<CAHut+Ps3Lbo=hGevYf8AyjFo8+=SSwXUo7onB-6nS6e-Q-bQoQ@mail.gmail.com>
	<[email protected]>
	<CAHut+Pss00B5C9+Urg1yKUPL41O_atvTTTiG8WZ_SsNUfJVfQA@mail.gmail.com>
	<[email protected]>

On Thu, Dec 14, 2023 at 09:38:40AM +0100, Peter Eisentraut wrote:
> After these discussions, I think this rule change was not a good idea. It
> effectively enforces these kinds of inconsistencies.  For example, if you
> ever refactored
> 
>     "DateStyle is wrong"
> 
> to
> 
>     "%s is wrong"
> 
> you'd need to adjust the quotes, and thus user-visible behavior, for
> entirely internal reasons.  This is not good.

So, what are you suggesting?  Should the encouraged rule be removed
from the docs?  Or do you object to some of the changes done in the
latest patch series v5?

FWIW, I am a bit meh with v5-0001, because I don't see the benefits.
On the contrary v5-0003 is useful, because it reduces a bit the number
of strings to translate.  That's always good to take.  I don't have a
problem with v5-0002, either, where we'd begin using the name of the 
GUC as stored in the static tables rather than the name provided in
the SET query, particularly for the reason that it makes the GUC name
a bit more consistent even when using double-quotes around the
parameter name in the query, where the error messages would not force
a lower-case conversion.  The patch would, AFAIU, change HEAD from
that:
=# SET "intervalstylE" to popo;
ERROR:  22023: invalid value for parameter "intervalstylE": "popo"
To that:
=# SET "intervalstylE" to popo;
ERROR:  22023: invalid value for parameter "IntervalStyle": "popo"

> And then came the idea to
> determine the quoting dynamically, which I think everyone agreed was too
> much.  So I don't see a way to make this work well.

Yeah, with the quotes being language-dependent, any idea I can think
of is as good as unreliable and dead.
--
Michael


Attachments:

  [application/pgp-signature] signature.asc (833B, ../[email protected]/2-signature.asc)
  download

view thread (21+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: GUC names in messages
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox