Re: [GENERAL] Any postgres API available to get errorcode for PQerrorMessage

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [GENERAL] Any postgres API available to get errorcode for PQerrorMessage
Дата
Msg-id 4478.1413390995@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: [GENERAL] Any postgres API available to get errorcode for PQerrorMessage  ("Roopeshakumar Narayansa Shalgar (rshalgar)" <rshalgar@cisco.com>)
Список pgsql-sql
"Roopeshakumar Narayansa Shalgar (rshalgar)" <rshalgar@cisco.com> writes:
> HI,
> PQerrorMessage pirints the error message like (no space available,etc). Does postgres provide
> any  API which gives the error code listed in the below appendix;

> http://www.postgresql.org/docs/9.1/static/errcodes-appendix.html

Use PQresultErrorField(..., PG_DIAG_SQLSTATE)

http://www.postgresql.org/docs/9.3/static/libpq-exec.html#LIBPQ-EXEC-MAIN

            regards, tom lane


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: could not access status of transaction pg_multixact issue
Следующее
От: "Roopeshakumar Narayansa Shalgar (rshalgar)"
Дата:
Сообщение: Re: [GENERAL] Any postgres API available to get errorcode for PQerrorMessage