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

Поиск
Список
Период
Сортировка
От didier
Тема Re: [proposal] Add an option for returning SQLSTATE in psql error message
Дата
Msg-id CAJRYxu+X637Tdn+hkZe81dr0oaCxksw7z-ewn4uUL2ANOdr7Rw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [proposal] Add an option for returning SQLSTATE in psql error message  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Ответы Re: [proposal] Add an option for returning SQLSTATE in psql error message  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Yep, name is bad, but I'm not sure about VERBOSITY, isn't it
controlling output from the server not the client?
You may want to set both VERBOSITY to 'verbose' and ECHO_ERROR to
'none' then in script do
SELECT .... -- no error output
\if :ERROR
   -- do something with LAST_ERROR_MESSAGE



On Mon, Dec 3, 2018 at 4:49 PM Andrew Gierth
<andrew@tao11.riddles.org.uk> wrote:
>
> >>>>> "didier" == didier  <did447@gmail.com> writes:
>
>  didier> Attached a POC adding a new variable ECHO_ERROR
>  didier> \set ECHO_ERROR text|none|psqlstate
>
> I wouldn't have called it that. Possibly another option to the existing
> VERBOSITY variable? \set VERBOSITY sqlstate_only or something of that
> ilk (it's already not unusual to use \set VERBOSITY terse in regression
> tests)
>
> --
> Andrew (irc:RhodiumToad)


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: [proposal] Add an option for returning SQLSTATE in psql error message
Следующее
От: Liudmila Mantrova
Дата:
Сообщение: Re: SQL/JSON: documentation