Is there a nesting limit for subqueries in PostgreSQL?
<p>I am constructing the query string in code and the easiest way I see to add new parameters is to add subqueries something like this:</p>

<pre><code>query = "SELECT * FROM table";
query = "SELECT * FROM (" + query 
         + MessageFormat.format(" ) as subquery where x = {0}", y);
query += ";";
</code></pre>

<p>So I might have quite a lot of such subqueries at the end and I wonder if there is a limit I might hit. </p>