Re: allow LIMIT in UPDATE and DELETE

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: allow LIMIT in UPDATE and DELETE
Дата
Msg-id 2296.1148057843@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: allow LIMIT in UPDATE and DELETE  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
Martijn van Oosterhout <kleptog@svana.org> writes:
> Err, you don't need an index on ctid because the ctid represents that
> physical location of the tuple on disk. ctids are what indexes use to
> refer to tuples...

> # explain DELETE FROM t WHERE ctid=(SELECT ctid FROM t WHERE pronargs=1 LIMIT 1);

This doesn't currently work for more than one tuple, though: the natural
locution would be "WHERE ctid IN (SELECT returning more than one tid)"
but the planner/executor don't cope with doing that efficiently.  Might
be worth trying to fix that.

            regards, tom lane

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

Предыдущее
От: Csaba Nagy
Дата:
Сообщение: Re: allow LIMIT in UPDATE and DELETE
Следующее
От: Joachim Wieland
Дата:
Сообщение: Re: VACUUM FULL hangs on ordinary table