Re: Error with views containing sub-queries with distinct

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Sean P(dot) Thomas" <spt(at)ulanji(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Error with views containing sub-queries with distinct
Date: 2003-10-18 05:17:10
Message-ID: 29007.1066454230@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Sean P. Thomas" <spt(at)ulanji(dot)com> writes:
> I get:
> JOIN qualification may not refer to other relations

Problem confirmed here, will look into it. I have a feeling this is a
bad side-effect of this patch:

2003-10-13 19:48 tgl

* src/backend/optimizer/prep/prepjointree.c: pull_up_subqueries()
should copy the subquery before starting to modify it. Not sure
why I'd thought it would be a good idea to do differently way back
when, but Greg Stark exposed the folly of doing so ...

but I don't see why as yet.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jean-Paul ARGUDO 2003-10-18 08:23:39 Re: Mapping Oracle types to PostgreSQL types
Previous Message Tom Lane 2003-10-18 04:37:13 Re: Vacuum thoughts