Re: Is there public API to fetch errcode? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Is there public API to fetch errcode?
Date
Msg-id 26090.1760290044@sss.pgh.pa.us
Whole thread Raw
In response to Is there public API to fetch errcode?  (Sergey Fukanchik <s.fukanchik@postgrespro.ru>)
Responses Re: Is there public API to fetch errcode?
List pgsql-hackers
Sergey Fukanchik <s.fukanchik@postgrespro.ru> writes:
> Does libpq have an API to extract this code?

PQresultErrorField(res, PG_DIAG_SQLSTATE) should do, no?

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Add LZ4 compression in pg_dump
Next
From: "David G. Johnston"
Date:
Subject: Re: Is there public API to fetch errcode?