Re: Is there public API to fetch errcode?

Поиск
Список
Период
Сортировка
От Sergey Fukanchik
Тема Re: Is there public API to fetch errcode?
Дата
Msg-id f0fa1acc-b994-4d16-8955-8ef8dffe9fb9@postgrespro.ru
обсуждение исходный текст
Ответ на Re: Is there public API to fetch errcode?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Is there public API to fetch errcode?
Список pgsql-hackers
sqlstate is saved into conn->last_sqlstate along with the error message
in pqGetErrorNotice3:

         if (id == PG_DIAG_SQLSTATE)
             strlcpy(conn->last_sqlstate, workBuf.data,
                     sizeof(conn->last_sqlstate));

is this usable? Can it be extracted somehow?

---

Sergey




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