David CARLIER <devnexen@gmail.com> 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