offset and limit in update and subselect

Поиск
Список
Период
Сортировка
От Timothy H. Keitt
Тема offset and limit in update and subselect
Дата
Msg-id 3A9814B1.1040804@SUNYSB.Edu
обсуждение исходный текст
Ответы Re: offset and limit in update and subselect  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

It appears that limit and offset do not work in a subselect such as:
update my_table set my_col = new_val where oid = (select oid from 
my_table offset row_number limit 1);

Basically, I need to update rows by offset from the beginning of the 
table.  Even nicer would be
update my_table set my_col = new_val offset row_number limit 1;

But this is not supported either.

Tim

-- 
Timothy H. Keitt
Department of Ecology and Evolution
State University of New York at Stony Brook
Phone: 631-632-1101, FAX: 631-632-7626
http://life.bio.sunysb.edu/ee/keitt/



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Adam Haberlach
Дата:
Сообщение: pg_atoi() behavior change? Intentional?
Следующее
От: "Timothy H. Keitt"
Дата:
Сообщение: Re: offset and limit in update and subselect