Skip site navigation (1) Skip section navigation (2)

Re: sqlstate 02000 while declaring cursor/freeing statement

From: "Thomas F(dot) O'Connell" <tfo(at)sitening(dot)com>
To: andy rost <andy(dot)rost(at)noaa(dot)gov>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: sqlstate 02000 while declaring cursor/freeing statement
Date: 2005-08-30 14:01:36
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
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'


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

The sqlstate of 02000 looks like the NO DATA code:

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™
110 30th Avenue North, Suite 6
Nashville, TN 37203-6320
615-469-5151 (fax)

In response to


pgsql-admin by date

Next:From: Michael FuhrDate: 2005-08-30 15:13:20
Subject: Re: sqlstate 02000 while declaring cursor/freeing statement
Previous:From: jose fuenmayorDate: 2005-08-30 13:26:16
Subject: Re: size of indexes and tables (more than 1GB)

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group