[SQL] Client and server cursors

John DeSoi jdesoi at planetc.com
Tue Mar 4 20:04:48 CST 2003


Ruslan,

At 11:08 PM +0200 3/4/03, Ruslan Zasukhin wrote:
>Now if you want do modifications of records you can do simply:
>
>     curs.Stringfield( "name" ) = 'something new'
>     curs.Update();  <<<<<<<< this send command to server.

Very nice model.


>As some of you know mySQL and Postgre, have client-side and server-side
>cursors.


FYI, cursors in PostgreSQL are a pain: (1) read only, (2) you must be 
in a transaction to have one (even though you can't modify anything), 
(3) there is no way to know how many records are in the cursor unless 
you scan them all or issue a SELECT count on the SQL used to create 
the cursor. I don't think there is such a thing as a client side 
cursor in PostgreSQL, but some of the various APIs may try to 
simulate something.

Best,

John DeSoi, Ph.D.




More information about the Valentina mailing list