libpq, connection error - question

Поиск
Список
Период
Сортировка
Искать

libpq, connection error - question

От:
David CARLIER <devnexen@gmail.com>
Дата:
Hi,

in case of PQconnectdb call failure, is it possible to get SQLstate code such as 28P01 and if yes in which circumstance(s) ? I can t seem to get it from PQerrorMessage.

Thanks in advance.

Re: libpq, connection error - question

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
David CARLIER  writes:
> in case of PQconnectdb call failure, is it possible to get SQLstate code
> such as 28P01 and if yes in which circumstance(s) ? I can t seem to get it
> from PQerrorMessage.

No, libpq generally doesn't assign SQLSTATE codes to errors generated
within libpq.  (Adding that has been on the TODO list for a long time,
but apparently few people care.)

			regards, tom lane


FAQ