Re: [proposal] Add an option for returning SQLSTATE in psql error message
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: didier <did447@gmail.com>
Cc: Pavel Stěhule <pavel.stehule@gmail.com>, andrew@tao11.riddles.org.uk, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2019-04-04T21:26:34Z
Lists: pgsql-hackers
didier <did447@gmail.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
Commits
-
Add a "SQLSTATE-only" error verbosity option to libpq and psql.
- 7bac3acab4d5 12.0 landed