> -----Original Message-----
> From: Jarmo Paavilainen
> 
> Hi,
> 
> Ive a SELECT cursor which I want to update/delete but postgresql does not
> support these:
> 
> UPDATE myTable SET myColumn = 'myValue' WHERE CURRENT OF myCursor
> DELETE myTable WHERE CURRENT OF myCursor
> 
> Does there exist any workaround?
> Or is my syntax wrong?
> 
> One workaround would be to get the row id and to be able to update it.
> Something like this:
> 
> ... a row is selected and fetched ...
>

You may be able to use CTID.
You could get CTIDs by using SELECT statements like
        select CTID,* from myTable;
and update using CTID 
        update myTable set ..=.. where CTID=..;

Note that CTIDs aren't of int type.

Regards.

Hiroshi Inoue

Reply via email to