Any postgres API available to get errorcode for PQerrorMessage - Mailing list pgsql-general

From Roopeshakumar Narayansa Shalgar (rshalgar)
Subject Any postgres API available to get errorcode for PQerrorMessage
Date
Msg-id F9567754259D974D88F5F5337C9D219620BD0C43@xmb-aln-x11.cisco.com
Whole thread Raw
Responses Re: Any postgres API available to get errorcode for PQerrorMessage  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Any postgres API available to get errorcode for PQerrorMessage  (Rob Sargent <robjsargent@gmail.com>)
List pgsql-general

HI,

 

PQerrorMessage pirints the error message like (no space available,etc). Does postgres provide

any  API which gives the error code listed in the below appendix;

 

http://www.postgresql.org/docs/9.1/static/errcodes-appendix.html

 

 

I need the exact error code so that I can shutdown my application whenever I face  the “no space available” problem.

 

--

Thanks and Regards,

Rupesh

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: How to start several PostgreSQL clusters at boot time on a Debian OS
Next
From: Tom Lane
Date:
Subject: Re: Any postgres API available to get errorcode for PQerrorMessage