pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Álvaro Herrera <alvherre@kurilemu.de>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Miscellaneous message fixes
Date: Wed, 11 Feb 2026 07:03:47 +0900
Message-ID: <aYurQ_SLbysSvD0n@paquier.xyz> (raw)
In-Reply-To: <3706800.1770735323@sss.pgh.pa.us>
References: <202602101023.p75nm75pl7jh@alvherre.pgsql>
	<3706800.1770735323@sss.pgh.pa.us>

On Tue, Feb 10, 2026 at 09:55:23AM -0500, Tom Lane wrote:
> Yeah, this code is simply wrong.  You should remove the
> quote_identifier() calls and otherwise leave it as-is.
> 
> quote_identifier(), quote_qualified_identifier(), etc are meant for
> building valid SQL strings.  However, an error message is a totally
> different animal.  We decided years ago that the preferred style is
> to wrap "..." around the unadorned identifier *in the error text*,
> not by using quote_identifier(), so that translators could replace
> the double-quote marks with appropriate marks for their language.
> Is the English version 100% consistent in the presence of identifiers
> containing double-quote marks?  No.  But we'd be making matters
> worse not better for other languages if we did it differently.

Right, I had a brain fart on this one.  Using "%s"."%s" where the
namespace and object names were independently quoted is also not
project style.  At the end, I have removed the quote_identifier()
calls altogether, and reduced the number of quotes in the error
strings, leading to f33c58577422 as a result.  If there is anything
else, please let me know. 
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../aYurQ_SLbysSvD0n@paquier.xyz/2-signature.asc)
  download

view thread (11+ messages)  latest in thread

Message-ID: <aYurQ_SLbysSvD0n@paquier.xyz>
Permalink:  ../aYurQ_SLbysSvD0n@paquier.xyz/
Also on:    postgresql.org/message-id/aYurQ_SLbysSvD0n@paquier.xyz

 · 

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: pgsql-hackers@postgresql.org
  Cc: michael@paquier.xyz, tgl@sss.pgh.pa.us, alvherre@kurilemu.de, horikyota.ntt@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: Miscellaneous message fixes
  In-Reply-To: <aYurQ_SLbysSvD0n@paquier.xyz>

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

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