Re: "stack depth limit exceeded" executing DELETE FROM

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: "stack depth limit exceeded" executing DELETE FROM
Дата
Msg-id 20060905184450.GA41016@winnie.fuhr.org
обсуждение исходный текст
Ответ на "stack depth limit exceeded" executing DELETE FROM  ("Cox, Brian" <Brian.Cox@ca.com>)
Ответы Re: "stack depth limit exceeded" executing DELETE FROM
Список pgsql-jdbc
On Tue, Sep 05, 2006 at 02:18:05PM -0400, Cox, Brian wrote:
> The following fails with a "stack depth limit exceeded":
>
> DELETE FROM some-table WHERE pk IN (pk1, pk2, ..., pkN)
>
> where pk = primary key and N is large, may be > 50000.
>
> Is there some limit as to the number of rows that can
> be deleted in a single DELETE?

The error isn't due to the number of rows being deleted but rather
from parsing the large number of items in the IN list.  See the
following thread:

http://archives.postgresql.org/pgsql-general/2006-01/msg00959.php

How are you obtaining the N values?  A subquery that returns the
equivalent list should work.  You could also try increasing
max_stack_depth (or max_expr_depth in 7.4 and earlier), but be sure
to stay within your system's stack depth resource limit.

--
Michael Fuhr

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

Предыдущее
От: Mark Lewis
Дата:
Сообщение: Re: "stack depth limit exceeded" executing DELETE FROM
Следующее
От: AgentM
Дата:
Сообщение: Re: "stack depth limit exceeded" executing DELETE FROM