Re: libpq: how to get error code (not message)

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: libpq: how to get error code (not message)
Дата
Msg-id 20041202060648.GA60984@winnie.fuhr.org
обсуждение исходный текст
Ответ на libpq: how to get error code (not message)  (X X <junkmbox@yahoo.com>)
Список pgsql-interfaces
On Wed, Dec 01, 2004 at 07:11:44PM -0800, X X wrote:

> I would like to know what function to call to obtain
> one of the codes listed at 
> 
> http://www.postgresql.org/docs/7.4/static/errcodes-appendix.html

I think you're looking for PQresultErrorField() called with the
fieldcode argument set to PG_DIAG_SQLSTATE.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/


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

Предыдущее
От: X X
Дата:
Сообщение: libpq: how to get error code (not message)
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: libpq: how to get error code (not message)