X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 35ECB9DC989 for ; Tue, 20 Dec 2005 18:11:43 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 75269-06 for ; Tue, 20 Dec 2005 18:11:44 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.204]) by postgresql.org (Postfix) with ESMTP id DF6B69DC953 for ; Tue, 20 Dec 2005 18:11:40 -0400 (AST) Received: by wproxy.gmail.com with SMTP id 57so2901wri for ; Tue, 20 Dec 2005 14:11:43 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Y4o3TUgymTfyj2RR+bWkl3I5hFDbb1H/3RTuow17AgUiiulzPd4TKsYEU4R8KGW/ZSQ9F85UZeIr02Rb7Onci1NGowNxy7O1Sy2E9MlH2MVZ3MX3fEOFknigbJQtfBzvBo23EBfesjmwrsbfCNg6VgTGqgcgXkECJWZ5kkM+uvo= Received: by 10.54.110.19 with SMTP id i19mr20136wrc; Tue, 20 Dec 2005 14:11:43 -0800 (PST) Received: by 10.54.98.6 with HTTP; Tue, 20 Dec 2005 14:11:42 -0800 (PST) Message-ID: Date: Tue, 20 Dec 2005 17:11:42 -0500 From: Jaime Casanova To: Tom Lane Subject: Re: Cursors for update.., we have to port an informix 9.x appication using cursors for update Cc: jmadm@montevideo.com.uy, pgsql-interfaces@postgresql.org In-Reply-To: <6567.1135115219@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <43A85FA9.3060607@montevideo.com.uy> <6567.1135115219@sss.pgh.pa.us> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.087 required=5 tests=[AWL=0.087] X-Spam-Score: 0.087 X-Spam-Level: X-Archive-Number: 200512/35 X-Sequence-Number: 5903 On 12/20/05, Tom Lane wrote: > jmadm 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, in the cursor or instead of the cursor? IIRC, cursors are read only in post= gres -- regards, Jaime Casanova (DBA: DataBase Aniquilator ;)