"Robert B. Easter" <reaster(at)comptechnews(dot)com> writes:
> -- this crashes
> select a, (SELECT b FROM y WHERE y.b = x.a + 1) AS b
> FROM x WHERE a IN (SELECT b FROM y)
> GROUP BY a,b
> HAVING a IN (SELECT b FROM y WHERE b > 1);
Fixed. 'Twas another case of trying to close a subplan twice ...
regards, tom lane