Re: SQLSTATE of notice PGresult

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SQLSTATE of notice PGresult
Дата
Msg-id 25146.1285166730@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: SQLSTATE of notice PGresult  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Sep 22, 2010 at 4:18 AM, Dmitriy Igrishin <dmitigr@gmail.com> wrote:
>> Okay, as Robert points, "00000" code in successful messages seems as waste
>> of bytes. But according to the documentation, "All messages emitted by the
>> PostgreSQL server are assigned five-character error codes that follow the
>> SQL
>> standard's conventions for "SQLSTATE" codes." - the first sentence of
>> http://www.postgresql.org/docs/9.0/static/errcodes-appendix.html

> Sounds like that wording needs some adjustment.

That wording is correct as it stands.

If I recall the previous discussion here, the problem is that the OP
is reading that and thinking that it applies also to errors generated
internally by libpq.  We should, but don't, have any support for
assigning SQLSTATEs to those.  But the server always emits a SQLSTATE
when sending a notice or error message --- read
send_message_to_frontend() if you doubt it.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Needs Suggestion
Следующее
От: Tom Lane
Дата:
Сообщение: Re: snapshot generation broken