Re: Deleting 100 rows which meets certain criteria

Поиск
Список
Период
Сортировка
От Anthony
Тема Re: Deleting 100 rows which meets certain criteria
Дата
Msg-id 71cd4dd90912301556x61a9470dp937df069ca0ed52e@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Deleting 100 rows which meets certain criteria  (APseudoUtopia <apseudoutopia@gmail.com>)
Список pgsql-general
On Wed, Dec 30, 2009 at 1:43 PM, APseudoUtopia <apseudoutopia@gmail.com> wrote:
You're correct to infer that DELETE does not support LIMIT clauses.
The reason for this is there is no way to tell exactly which rows will
be deleted (unless ORDER BY is used - but there are still other issues
with that as well).

You could, however, do something like such:
DELETE FROM "table" WHERE "column" IN (SELECT "column" FROM "table"
LIMIT 100 OFFSET 0);

(But again, you would need explicit ORDER BY clauses to determine
exactly which rows are actually deleted.

Are there any plans to disable that method as well, since it suffers from the same problem? 

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

Предыдущее
От: Reece Hart
Дата:
Сообщение: Re: Deleting 100 rows which meets certain criteria
Следующее
От: Jeff Amiel
Дата:
Сообщение: PANIC: right sibling 2019 of block 2018 is not next child of 1937 in index "sl_log_2_idx1"