gdurbin(at)synchr(dot)com writes:
> Two queries follow. The first gets the error, the second doesn't the only
> difference is the additional expression in the where clause in the inner
> join.
This is not investigatable without a self-contained test case.
The problem query alone is not useful, especially not when it's
this complicated.
http://www.postgresql.org/docs/9.1/static/bug-reporting.html
regards, tom lane