I'm running in my jboss 5.1-java-jpa-hibernate-postgresql application a select query. This query is a UNION query of arroung 10 queries and normally for now it should return around 25.000 BigInteger numbers (more to become later). Yesterday this function worked fine. Today I got the following error. Can someone please advice? I can't find much about this error.
ERROR: stack depth limit exceeded Hint: Increase the configuration parameter "max_stack_depth", after ensuring the platform's stack depth limit is adequate.
If I run the 10 queries one after another alone and then add the results in one ArrayList will that help?
EDIT:
Postgresql version used: postgresql-9.0-801.jdbc4.jar
I can't show the exact query for security reasons. But it is something like:
SELECT * FROM (
SELECT fileId FROM table1
UNION
SELECT fileId FROM table2
...
...
SELECT fileId FROM table_n
);
This query returns now arround 25.000 BigInteger entries ( which are about to reach 120.000 in the future ). Any suggestions?
EXPLAIN
of the query. Are there PL/PgSQL functions involved? – Craig Ringer Mar 22 '13 at 9:47