Re: [proposal] Add an option for returning SQLSTATE in psql error message

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: didier <did447(at)gmail(dot)com>
Cc: Pavel Stěhule <pavel(dot)stehule(at)gmail(dot)com>, andrew(at)tao11(dot)riddles(dot)org(dot)uk, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [proposal] Add an option for returning SQLSTATE in psql error message
Date: 2019-04-04 21:26:34
Message-ID: 18949.1554413194@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

didier <did447(at)gmail(dot)com> writes:
> [ 0001-Add-sqlstate-output-mode-to-VERBOSITY_v1.patch ]

Pushed with some mostly-cosmetic adjustments. The main non-cosmetic
thing I did was to adjust the logic so that if no SQLSTATE is available,
it acts like TERSE mode. Otherwise, we'd print nothing at all except
"ERROR:", which seems both quite useless and contrary to our message
style guidelines. Moreover, documenting it this way makes the behavior
not inconsistent with what happens for libpq-generated errors and
errors from protocol-version-2 servers.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bossart, Nathan 2019-04-04 21:36:57 Re: New vacuum option to do only freezing
Previous Message Justin Pryzby 2019-04-04 21:26:13 Re: query logging of prepared statements