Re: Any postgres API available to get errorcode for PQerrorMessage

From: Rob Sargent <robjsargent(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Any postgres API available to get errorcode for PQerrorMessage
Date: 2014-10-15 16:37:32
Message-ID: 543EA2CC.6010402@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

On 10/15/2014 02:17 AM, Roopeshakumar Narayansa Shalgar (rshalgar) wrote:
>
> 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
>
Isn't this best done by monitoring tools such as nagios and done much
before you actually run out of space?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Roopeshakumar Narayansa Shalgar (rshalgar) 2014-10-15 16:48:36 Re: [GENERAL] Any postgres API available to get errorcode for PQerrorMessage
Previous Message Tom Lane 2014-10-15 16:36:35 Re: [GENERAL] Any postgres API available to get errorcode for PQerrorMessage

Browse pgsql-sql by date

  From Date Subject
Next Message Roopeshakumar Narayansa Shalgar (rshalgar) 2014-10-15 16:48:36 Re: [GENERAL] Any postgres API available to get errorcode for PQerrorMessage
Previous Message Tom Lane 2014-10-15 16:36:35 Re: [GENERAL] Any postgres API available to get errorcode for PQerrorMessage