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

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: [INTERFACES] creatng a new interface to postgresql, how do I update a field with a particular oid?
Дата
Msg-id 35C5D148.3BD95CE5@trust.ee
обсуждение исходный текст
Ответ на creatng a new interface to postgresql, how do I update a field with a particular oid?  (Mark Nielsen <psql@www.tcu-inc.com>)
Список 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 по дате отправления:

Предыдущее
От: Maarten Boekhold
Дата:
Сообщение: Re: [INTERFACES] Re: [HACKERS] User authentication bug?
Следующее
От: "Kapoor, Nishikant X"
Дата:
Сообщение: How to set java.sql.Date to null ?