Hello all,

        I've noted that the MOVE command won't send you an error message if
you try to position the cursor AFTER the actual end of the records. Is this
ok ??? I think it should return a proper error code and message, but
instead, it will return only an empty recordset.

The following code will demonstrate what I mean:

rollback;begin;declare Test cursor for select typname from pg_type;move
10000 in Test;fetch 10 in Test;close Test;end;

I think 'move 10000' should raise an error...
Any comments ?
Does Oracle or other DBMSs act like this ?

I have another questions, since I can't find answers anywhere on the
documentation...
1) can DECLARE be modified to return the number of rows in the resultset,
maybe by adding some new parameter ?... Or it would it require to execute
the whole query before returning this value ?...
2) How does cursor queries really work: they execute the query, store all
rows in memory, and then pass small resultsets retrieved by FETCH commands
on the client, or does it produces and retrieves each recorset as each FETCH
command is issued ??

Best Regards,
Steve Howe



Fri, 3 Aug 2001 03:51:32 -0300
"Steve Howe" <howe@carcass.dhs.org>
Cursor queries & fetches