Re: [HACKERS] psql - add special variable to reflect the last query status

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] psql - add special variable to reflect the last query status
Дата
Msg-id 10693.1505152972@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] psql - add special variable to reflect the last querystatus  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: [HACKERS] psql - add special variable to reflect the last querystatus  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers
Fabien COELHO <coelho@cri.ensmp.fr> writes:
>> I think you're overly optimistic to believe that every failure will
>> have a SQLSTATE; I don't think that's true for libpq-reported errors,
>> such as connection loss.

> Yep, I thought I was optimistic:-) Can I add a special SQLSTATE for that 
> situation where libpq did not report an error?

Meh.  If we're going to do that I think it might be better to hack
libpq itself to do so, ie, force PQresultErrorField(..., PG_DIAG_SQLSTATE)
to always return something.  But it seems like a hack either way.
        regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] pgbench tap tests & minor fixes.
Следующее
От: Peter Eisentraut
Дата:
Сообщение: [HACKERS] Re: DROP SUBSCRIPTION hangs if sub is disabled in the sametransaction