Re: [PATCH] psql: Display SQLSTATE macro name in verbose error reports

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: Aaryan Parik <aaryanparik124(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] psql: Display SQLSTATE macro name in verbose error reports
Date: 2026-05-24 01:56:55
Message-ID: CACJufxG62iwtxYi33ebwhTLaE8JnxJhefoygczXOFhuHhvbTvQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, May 24, 2026 at 3:18 AM Aaryan Parik <aaryanparik124(at)gmail(dot)com> 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
>
> I believe this will be a handy quality-of-life improvement for developers. Looking forward to any feedback
>

This seems identical to the patch submitted in the previous email thread, [0].

[0]: https://www.postgresql.org/message-id/CAK3UJRGc2RKfQMjwVDAwsuOJuobq3d4%2BQf9KWK1NHmK1vaqyxQ%40mail.gmail.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2026-05-24 03:50:48 Re: splitting pg_resetwal output strings
Previous Message Sami Imseih 2026-05-24 01:29:26 Re: Improve pg_stat_statements scalability