Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mYZmr-0008NH-O9 for pgsql-general@arkaria.postgresql.org; Thu, 07 Oct 2021 20:14:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mYZmq-0001Pa-NG for pgsql-general@arkaria.postgresql.org; Thu, 07 Oct 2021 20:14:40 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mYZmq-0001PR-Dh for pgsql-general@lists.postgresql.org; Thu, 07 Oct 2021 20:14:40 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mYZmj-0003ti-U2 for pgsql-general@lists.postgresql.org; Thu, 07 Oct 2021 20:14:38 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id D5DB2573C; Thu, 7 Oct 2021 22:14:30 +0200 (CEST) Date: Thu, 7 Oct 2021 22:14:30 +0200 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: Misplaced double quotes in error message Message-ID: Mail-Followup-To: pgsql-general@lists.postgresql.org References: <55189.1633618509@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="vuvM0srGE12Xp+IL" Content-Disposition: inline In-Reply-To: <55189.1633618509@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --vuvM0srGE12Xp+IL Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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.) >=20 > 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 >=20 > ASTUCE : Peut-=C3=AAtre que vous souhaitiez r=C3=A9f=C3=A9rencer la colo= nne =C2=AB t.someColumn =C2=BB. >=20 > where it's at least clearer that the set-off marks are not meant to be > copied into a SQL statement. >=20 > 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 =E2=80=9Ct.somecolumn=E2=80=9D does not exist Hint: Perhaps you meant to reference the column =E2=80=9Ct.someColumn= =E2=80=9D. 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 --=20 _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" --vuvM0srGE12Xp+IL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmFfVSEACgkQ8g5IURL+ KF2dnhAApMmq4CDdgfhM8BGs0+ZKtX7yYmFO/0P1B4/8As2+XL6sCrhVIyMb2Wi2 YAbGfRJNq36lfDkpF6/HL3QdkYVDq2FYvjMb92k3vMpALQgcj8/UibA2fk2ScgNH mWyJt0QHY4Zsoc9Bq+CTHIV3ilQKOqT0QtyjnpqHbCaWPnSIrgRgH9LKpO3ZTAcx u8zDcEZK1qoF5crDkylCdlWqGVxWAKuUnjtFsOmsCh5MjhZKrMcagKxuH5RAZ51y XClTaxcVGZlOiPIkoSmWg9IOQdoeJ0jVaDi1Jxj+sccuwFAqtlcJVSWc7zW/d/OV 3aSfgkli/rWhy1YM6rk4eeABCRW0JSKdXH0bhPmOQMs/XwdxMqEBSq9zPUmBNXpW kL+Xe/1si6boCr9k/rfAURX0wEz5XEDe19RJEvT9TpwMkzmmXuP7x0pdP//ymKDw eKSvDZls5wywins/dsA2x29/+/vEd5qvo/Un0bWhBYmjoltKxeN4eiXofNsUx2cD PYh7Q+VYA9ImWNOqU7XpWApZtw2QJ0z+kwPOviWNlHcVPz6ThTnjtbFx6PwG2y6T IESgqASvIEtJ4PxnsIgui8HLGsohwUBfWuemLt7wwVdKu40FYv1B+BNp4ryd3hOP F/KBjJR9eaCnCaBeiZ2kwzaX7qEniudlcbUR2VL0yNlwL91PSlo= =PFZJ -----END PGP SIGNATURE----- --vuvM0srGE12Xp+IL--