Re: [INTERFACES] creatng a new interface to postgresql, how do I update a field with a particular oid? - Mailing list pgsql-interfaces

From Hannu Krosing
Subject Re: [INTERFACES] creatng a new interface to postgresql, how do I update a field with a particular oid?
Date
Msg-id 35C5D148.3BD95CE5@trust.ee
Whole thread Raw
In response to creatng a new interface to postgresql, how do I update a field with a particular oid?  (Mark Nielsen <psql@www.tcu-inc.com>)
List pgsql-interfaces
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

pgsql-interfaces by date:

Previous
From: Maarten Boekhold
Date:
Subject: Re: [INTERFACES] Re: [HACKERS] User authentication bug?
Next
From: "Kapoor, Nishikant X"
Date:
Subject: How to set java.sql.Date to null ?