Re: libpq, connection error - question - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: libpq, connection error - question
Date
Msg-id 2359907.1744916263@sss.pgh.pa.us
Whole thread Raw
In response to libpq, connection error - question  (David CARLIER <devnexen@gmail.com>)
List pgsql-interfaces
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



pgsql-interfaces by date:

Previous
From: David CARLIER
Date:
Subject: libpq, connection error - question