Re: Misplaced double quotes in error message

From: "Peter J(dot) Holzer" <hjp-pgsql(at)hjp(dot)at>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Misplaced double quotes in error message
Date: 2021-10-07 20:14:30
Message-ID: YV9VJgJnfGyZMLVU@hjp.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)hjp(dot)at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"

In response to

Browse pgsql-general by date

  From Date Subject
Next Message huangning290@yahoo.com 2021-10-08 01:04:43 Re: create a new GIN index for my own type
Previous Message Gavin Roy 2021-10-07 19:06:05 Re: Regression in PL/PGSQL code using RETURN QUERY with Postgres 14