Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wRaqn-002UtS-0v for pgsql-hackers@arkaria.postgresql.org; Mon, 25 May 2026 19:20:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wRaqj-001xtD-2m for pgsql-hackers@arkaria.postgresql.org; Mon, 25 May 2026 19:20:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wRaqj-001xt4-1s for pgsql-hackers@lists.postgresql.org; Mon, 25 May 2026 19:20:30 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wRaqg-00000001Oua-1SEX for pgsql-hackers@postgresql.org; Mon, 25 May 2026 19:20:28 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 64PJKNiJ137427; Mon, 25 May 2026 15:20:23 -0400 From: Tom Lane To: jian he cc: Aaryan Parik , pgsql-hackers@postgresql.org Subject: Re: [PATCH] psql: Display SQLSTATE macro name in verbose error reports In-reply-to: References: Comments: In-reply-to jian he message dated "Sun, 24 May 2026 09:56:55 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <137425.1779736823.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 25 May 2026 15:20:23 -0400 Message-ID: <137426.1779736823@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk jian he writes: > On Sun, May 24, 2026 at 3:18=E2=80=AFAM Aaryan Parik wrote: >> Example output: >> ERROR: 42601: syntax error at or near "FRO" >> LINE 1: SELECT * FRO; >> ^ >> LOCATION: scanner_yyerror, scan.l:1220 >> SQLSTATE name: ERRCODE_SYNTAX_ERROR > This seems identical to the patch submitted in the previous email thread= , [0]. It's not exactly the same: Josh's patch did the dirty work in libpq not psql. So this has a somewhat smaller blast radius for client compatibility problems (but still not zero). The other comments I posted in the other thread still apply though. regards, tom lane