Re: "stack depth limit exceeded" executing DELETE FROM - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: "stack depth limit exceeded" executing DELETE FROM
Date
Msg-id 18451.1157482745@sss.pgh.pa.us
Whole thread Raw
In response to "stack depth limit exceeded" executing DELETE FROM  ("Cox, Brian" <Brian.Cox@ca.com>)
List pgsql-jdbc
"Cox, Brian" <Brian.Cox@ca.com> writes:
> 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?

Not as such, but there's a limit on the complexity of WHERE clauses.
Raising max_stack_depth might help you, but you'll run out of RAM
eventually.

(FWIW, 8.2 will cope a lot better with this particular construct.)

            regards, tom lane

pgsql-jdbc by date:

Previous
From: Andreas Reichel
Date:
Subject: compress a resultset
Next
From: Mark Lewis
Date:
Subject: Re: "stack depth limit exceeded" executing DELETE FROM