Re: catch SQLException, error code for Foeign key violation, - Mailing list pgsql-general

From Kris Jurka
Subject Re: catch SQLException, error code for Foeign key violation,
Date
Msg-id Pine.BSO.4.63.0604190141510.14912@leary2.csoft.net
Whole thread Raw
In response to Re: catch SQLException, error code for Foeign key violation,  ("surabhi.ahuja" <surabhi.ahuja@iiitb.ac.in>)
List pgsql-general

On Wed, 19 Apr 2006, surabhi.ahuja wrote:

> what is the way to capture such exception in Cpp,
> are there any examples available for this?
>
> right now in cpp, i do this
>
> rStatus = PQresultStatus(result);
>
> but what is the specific error code, how to get that,
>

See PQresultErrorField

http://www.postgresql.org/docs/8.1/static/libpq-exec.html

Kris Jurka

pgsql-general by date:

Previous
From: Achilleus Mantzios
Date:
Subject: Re: Thoughts on a Isolation/Security problem
Next
From: Brendan Duddridge
Date:
Subject: page is uninitialized?