Re: Equivalent of PQresultErrorField for PGconn?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Equivalent of PQresultErrorField for PGconn?
Дата
Msg-id 3233.1059378550@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Equivalent of PQresultErrorField for PGconn?  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> I seem to be missing an equivalent of PQresultErrorField() that operates
> on a PGconn object (like PQerrorMessage() does).  This would be useful to
> detect errors that occur outside of a statement execution.

Yeah.  I thought about that, but the infrastructure is not there:
libpq's internal error reports would have to be restructured to deliver
multiple fields, in the same way as we have done in the backend.  There
was not time to make it happen for 7.4.

Looking at the spec's list of SQLSTATE codes, it seems clear that they
intend SQLSTATE to cover client-library-detected errors as well as
server-detected ones.  So it would make sense to tackle this project
for 7.5.
        regards, tom lane


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: "is_superuser" parameter creates inconsistencies
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Some macros for error field codes