public inbox for [email protected]
help / color / mirror / Atom feedlibpq, connection error - question
2+ messages / 2 participants
[nested] [flat]
* libpq, connection error - question
@ 2025-04-17 18:05 David CARLIER <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: David CARLIER @ 2025-04-17 18:05 UTC (permalink / raw)
To: pgsql-interfaces
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.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: libpq, connection error - question
@ 2025-04-17 18:57 Tom Lane <[email protected]>
parent: David CARLIER <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2025-04-17 18:57 UTC (permalink / raw)
To: David CARLIER <[email protected]>; +Cc: pgsql-interfaces
David CARLIER <[email protected]> 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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-04-17 18:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-04-17 18:05 libpq, connection error - question David CARLIER <[email protected]>
2025-04-17 18:57 ` Tom Lane <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox