Re: [proposal] Add an option for returning SQLSTATE in psql errormessage - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [proposal] Add an option for returning SQLSTATE in psql errormessage
Date
Msg-id b49212d4-bfdc-cafa-a7f9-9288423c735a@2ndquadrant.com
Whole thread Raw
In response to Re: [proposal] Add an option for returning SQLSTATE in psql error message  (didier <did447@gmail.com>)
Responses Re: [proposal] Add an option for returning SQLSTATE in psql error message  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 04/12/2018 13:18, didier wrote:
> diff --git a/src/test/regress/sql/psql.sql b/src/test/regress/sql/psql.sql
> index 1bb2a6e16d..64628f29a3 100644
> --- a/src/test/regress/sql/psql.sql
> +++ b/src/test/regress/sql/psql.sql
> @@ -1016,3 +1016,22 @@ select 1/(15-unique2) from tenk1 order by unique2 limit 19;
>  \echo 'last error code:' :LAST_ERROR_SQLSTATE
>  
>  \unset FETCH_COUNT
> +
> +-- verbosity error setting
> +\set VERBOSITY terse
> +SELECT 1 UNION;
> +\echo 'error:' :ERROR
> +\echo 'error code:' :SQLSTATE
> +\echo 'last error message:' :LAST_ERROR_MESSAGE
> +
> +\set VERBOSITY sqlstate
> +SELECT 1 UNION;
> +\echo 'error:' :ERROR
> +\echo 'error code:' :SQLSTATE
> +\echo 'last error message:' :LAST_ERROR_MESSAGE
> +
> +\set VERBOSITY default
> +SELECT 1 UNION;
> +\echo 'error:' :ERROR
> +\echo 'error code:' :SQLSTATE
> +\echo 'last error message:' :LAST_ERROR_MESSAGE
> -- 

Why are you not including a test for \set VERBOSITY verbose?

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [PATCH] Log PostgreSQL version number on startup
Next
From: Peter Eisentraut
Date:
Subject: Re: [PATCH] Improvements to "Getting started" tutorial for GoogleCode-in task