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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

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: Tue, 20 Dec 2005 16:46:59 -0500
  • Message-id: <6567.1135115219@sss.pgh.pa.us> <text/plain>

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



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group