pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas F. O'Connell <tfo@sitening.com>
To: andy rost <andy.rost@noaa.gov>
Cc: pgsql-admin@postgresql.org
Subject: Re: sqlstate 02000 while declaring cursor/freeing statement
Date: Tue, 30 Aug 2005 09:01:36 -0500
Message-ID: <4DADE9CC-4B44-4A9A-A424-E7916937610C@sitening.com> (raw)
In-Reply-To: <43135FA9.3060807@noaa.gov>
References: <43135FA9.3060807@noaa.gov>


On Aug 29, 2005, at 2:19 PM, andy rost wrote:

> I'm new to the PostgreSQL community so please pardon what is  
> probably a silly question ...
>
> I'm in the process of porting Informix ESQL to PostgreSQL. I  
> occasionally get sqlcode = 100 and sqlstate = 02000 when declaring  
> cursors or freeing prepared statements. Is this normal? For example:
>
>     $declare loop1 cursor with hold for
>     select distinct ( tabname )
>     from meta ;
>
> results in sqlca.sqlcode = 100 and sqlca.sqlstate = '02000'

Andy,

According to the docs, a positive value of sqlcode indicates a  
harmless condition:

http://www.postgresql.org/docs/8.0/static/ecpg-errors.html

The sqlstate of 02000 looks like the NO DATA code:

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

I don't see anything wrong with your cursor declaration, so this just  
looks like it's indicating that no rows were returned.

--
Thomas F. O'Connell
Co-Founder, Information Architect
Sitening, LLC

Strategic Open Source: Open Your i™

http://www.sitening.com/
110 30th Avenue North, Suite 6
Nashville, TN 37203-6320
615-469-5150
615-469-5151 (fax)


view thread (4+ messages)  latest in thread

Message-ID: <4DADE9CC-4B44-4A9A-A424-E7916937610C@sitening.com>
Permalink:  ../4DADE9CC-4B44-4A9A-A424-E7916937610C@sitening.com/
Also on:    postgresql.org/message-id/4DADE9CC-4B44-4A9A-A424-E7916937610C@sitening.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tfo@sitening.com, andy.rost@noaa.gov
  Subject: Re: sqlstate 02000 while declaring cursor/freeing statement
  In-Reply-To: <4DADE9CC-4B44-4A9A-A424-E7916937610C@sitening.com>
  References: <43135FA9.3060807@noaa.gov> <4DADE9CC-4B44-4A9A-A424-E7916937610C@sitening.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox