Received: from sid.trust.ee (sid.trust.ee [194.204.23.180]) by hub.org (8.8.8/8.7.5) with ESMTP id KAA03757 for ; Mon, 3 Aug 1998 10:58:52 -0400 (EDT) Received: from trust.ee (wink.trust.ee [194.204.23.184]) by sid.trust.ee (8.8.7/8.8.7) with ESMTP id SAA03953; Mon, 3 Aug 1998 18:04:06 +0300 Message-ID: <35C5D148.3BD95CE5@trust.ee> Date: Mon, 03 Aug 1998 18:03:36 +0300 From: Hannu Krosing X-Mailer: Mozilla 4.05 [en] (Win95; I) MIME-Version: 1.0 To: Mark Nielsen CC: interface Subject: Re: [INTERFACES] creatng a new interface to postgresql, how do I update a field with a particular oid? References: <199808030152.VAA24510@www.tcu-inc.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mark Nielsen wrote: > > Hello! > > > Anyways, my question is, I want to update specific rows according to their > oids. Oh, I am also using the perl module Pg. I can find out the oid of > the data retrieved, but I want to update data according to their oid. update my_table set field1 = value1, field2 = value2 where oid = my_oid ; to make it faster you can create an index on the oid column. It used to require a cast for pg to use the index, i.e. where oid = const_oid::oid but I don't know if it is still the case. postgresql does not yet have a "select for update" syntax or mechanics implemented. ---------- Hannu