pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: jmadm@montevideo.com.uy
Cc: pgsql-interfaces@postgresql.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> (raw)
In-Reply-To: <43A85FA9.3060607@montevideo.com.uy>
References: <43A85FA9.3060607@montevideo.com.uy>

jmadm <jmadm@montevideo.com.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



view thread (4+ messages)  latest in thread

Message-ID: <6567.1135115219@sss.pgh.pa.us>
Permalink:  ../6567.1135115219@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/6567.1135115219@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jmadm@montevideo.com.uy
  Subject: Re: Cursors for update.., we have to port an informix 9.x appication using cursors for update
  In-Reply-To: <6567.1135115219@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox