pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter J. Holzer <hjp-pgsql@hjp.at>
To: pgsql-general@lists.postgresql.org
Subject: Re: Misplaced double quotes in error message
Date: Thu, 7 Oct 2021 22:14:30 +0200
Message-ID: <YV9VJgJnfGyZMLVU@hjp.at> (raw)
In-Reply-To: <55189.1633618509@sss.pgh.pa.us>
References: <bdda62ba-ec52-60bb-ab43-786187d7066c@gmx.net>
	<cde592cd-7f86-aa7c-90d4-09584a77ae52@aklaver.com>
	<55189.1633618509@sss.pgh.pa.us>

On 2021-10-07 10:55:09 -0400, Tom Lane wrote:
> Yeah.  This is not as simple as it looks, because per our message
> style guidelines, double quotes are used to set off inserted text,
> independently of whether it is a SQL identifier or something else.
> (There is a style violation in this message: the occurrence of
> t.somecolumn in the primary message should've been quoted too.)
> 
> In translated error messages, the English double quotes are replaced
> with whatever the common quoting marks are in that language.  So
> for instance in French this becomes
> 
> ASTUCE :  Peut-être que vous souhaitiez référencer la colonne « t.someColumn ».
> 
> where it's at least clearer that the set-off marks are not meant to be
> copied into a SQL statement.
> 
> In short, what we've got here is unfortunate confusion between the meaning
> of double quotes in ordinary English and their meaning in SQL.  People
> complain about this topic every so often, but I've not yet seen a proposal
> that would improve matters.

You could use proper typographic quotes in English, too:

    ERROR: column “t.somecolumn” does not exist
    Hint: Perhaps you meant to reference the column “t.someColumn”.

But that's optically not very different (depends on your font, of
course) and your terminal has to support Unicode (or at least a subset
which includes those quotes).

        hp

-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (5+ messages)

Message-ID: <YV9VJgJnfGyZMLVU@hjp.at>
Permalink:  ../YV9VJgJnfGyZMLVU@hjp.at/
Also on:    postgresql.org/message-id/YV9VJgJnfGyZMLVU@hjp.at

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: hjp-pgsql@hjp.at
  Subject: Re: Misplaced double quotes in error message
  In-Reply-To: <YV9VJgJnfGyZMLVU@hjp.at>
  References: <bdda62ba-ec52-60bb-ab43-786187d7066c@gmx.net> <cde592cd-7f86-aa7c-90d4-09584a77ae52@aklaver.com> <55189.1633618509@sss.pgh.pa.us> <YV9VJgJnfGyZMLVU@hjp.at>

* 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