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

Re: Cursor

From: Joe <dev(at)freedomcircle(dot)net>
To: Xavier Bermeo <xbermeo(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Cursor
Date: 2008-08-16 18:54:07
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
Xavier Bermeo wrote:
> Hi, guys.......
> I have  problems with cursosrs.
> Anyone have an example complete the how  load and read each position 
> of a cursor?
> I wait your answer........
> Thanks.......guys

Assuming you're using ECPG, there are a couple of examples in the 
documentation, e.g.,
 (see Select using cursors:

The essence is you DECLARE the cursor, OPEN it and then FETCH rows in 
some kind of loop, and finish by CLOSE cursor.  To exit the loop, you 
can check sqlca.sqlcode for 100 (NOT FOUND) or a SQLSTATE of 02000.


In response to

  • Cursor at 2008-08-16 17:53:48 from Xavier Bermeo

pgsql-sql by date

Next:From: Xavier BermeoDate: 2008-08-16 19:35:55
Subject: Cursor
Previous:From: Xavier BermeoDate: 2008-08-16 17:53:48
Subject: Cursor

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