Re: Cursors for update.., we have to port an informix 9.x appication using cursors for update

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jmadm(at)montevideo(dot)com(dot)uy
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Cursors for update.., we have to port an informix 9.x appication using cursors for update
Date: 2005-12-20 21:46:59
Message-ID: 6567.1135115219@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

jmadm <jmadm(at)montevideo(dot)com(dot)uy> writes:
> We have to port an application from Informix 9 CSQL to Postgres 8.1
> using Ecpg.

> Informix application uses cursors for update to lock all the rows
> involved in those cursor. Then an update my occur ussing Current of.

> How we can do this with postgres?

You can use SELECT FOR UPDATE in the cursor, I think. We don't support
WHERE CURRENT OF, so you'll need an alternative strategy for identifying
the row in the UPDATE command; you could use the table's primary key,
or CTID if you don't mind being quite Postgres-specific.

regards, tom lane

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Jaime Casanova 2005-12-20 22:11:42 Re: Cursors for update.., we have to port an informix 9.x appication using cursors for update
Previous Message jmadm 2005-12-20 19:46:49 Cursors for update.., we have to port an informix 9.x appication using cursors for update