public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: David CARLIER <[email protected]>
Cc: [email protected]
Subject: Re: libpq, connection error - question
Date: Thu, 17 Apr 2025 14:57:43 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+XhMqzSx8rEn6EgZV-uxd6HCC6PZwVoW7hSJdXL3Qts5wSmLg@mail.gmail.com>
References: <CA+XhMqzSx8rEn6EgZV-uxd6HCC6PZwVoW7hSJdXL3Qts5wSmLg@mail.gmail.com>
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
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: libpq, connection error - question
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox