Re: Is there public API to fetch errcode?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sergey Fukanchik <s(dot)fukanchik(at)postgrespro(dot)ru>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Is there public API to fetch errcode?
Date: 2025-10-12 17:27:24
Message-ID: 26090.1760290044@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Sergey Fukanchik <s(dot)fukanchik(at)postgrespro(dot)ru> writes:
> Does libpq have an API to extract this code?

PQresultErrorField(res, PG_DIAG_SQLSTATE) should do, no?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2025-10-12 17:37:06 Re: Is there public API to fetch errcode?
Previous Message Tom Lane 2025-10-12 17:24:37 Re: Add LZ4 compression in pg_dump