Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XeRaC-0006F6-NI for pgsql-general@arkaria.postgresql.org; Wed, 15 Oct 2014 16:37:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XeRaB-0005DT-S2 for pgsql-general@arkaria.postgresql.org; Wed, 15 Oct 2014 16:37:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XeRa8-00056b-2b for pgsql-general@postgresql.org; Wed, 15 Oct 2014 16:37:48 +0000 Received: from mail-oi0-x236.google.com ([2607:f8b0:4003:c06::236]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XeRa3-00064R-Ee for pgsql-general@postgresql.org; Wed, 15 Oct 2014 16:37:46 +0000 Received: by mail-oi0-f54.google.com with SMTP id v63so1264555oia.27 for ; Wed, 15 Oct 2014 09:37:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=GA3/4v7ZXZsS/uQRNZjRlud8x0DEtfp23CobvwyGrkM=; b=xhITi3MDIS8aug0xyUz4pyoT5LeNUZsgv2dUb2Ka3xVIDxtu2uQ5cdPtlHXsVuvfb9 ihEk7jG1OCj53c0wJ/kps8kUCnz6L+EQ0AmVVJxwEK5fwvOz6ZcW3WSVkn42/ieqUQ1G VGLJBeI0t5LkafTnMij5GkciNTa/ZcdH5/BB89lkzsREJSWODXjlxp1mgwXh4ZZNv+Oc YAusb07nc2HHS59KjOIaWAT3dyqgzJhXjNhxSQX1Zob8wKv1o5zfalvQOxVMG+lXVDd5 NNf4AAULvdj2525/b6iELTJiOH1ZRuHpqZr+XhAFs/uun05vjh0CeLYshTbaW74BXUub 30Fg== X-Received: by 10.182.246.40 with SMTP id xt8mr3026242obc.59.1413391060907; Wed, 15 Oct 2014 09:37:40 -0700 (PDT) Received: from purity.med.utah.edu (purity.med.utah.edu. [155.100.158.98]) by mx.google.com with ESMTPSA id mq4sm11855629obb.22.2014.10.15.09.37.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 15 Oct 2014 09:37:40 -0700 (PDT) Message-ID: <543EA2CC.6010402@gmail.com> Date: Wed, 15 Oct 2014 10:37:32 -0600 From: Rob Sargent User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.8.0 MIME-Version: 1.0 To: pgsql-general@postgresql.org Subject: Re: Any postgres API available to get errorcode for PQerrorMessage References: In-Reply-To: Content-Type: multipart/alternative; boundary="------------090004050809080303000104" X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org This is a multi-part message in MIME format. --------------090004050809080303000104 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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? --------------090004050809080303000104 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
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?
--------------090004050809080303000104--