Re: bug with current sources? Re: cost of parse/plan/execute - Mailing list pgsql-hackers

From Barry Lind
Subject Re: bug with current sources? Re: cost of parse/plan/execute
Date
Msg-id 3CBA5ABA.1070609@xythos.com
Whole thread Raw
In response to cost of parse/plan/execute for one sample query  (Barry Lind <barry@xythos.com>)
Responses Re: bug with current sources? Re: cost of parse/plan/execute for one sample query  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: bug with current sources? Re: cost of parse/plan/execute for one sample query  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom,

OK here is a test case:

create table test1 (t1a int);
create table test2 (t2a int);
create table test3 (t3a int);
SELECT x2.t2a
FROM ((test1 t1 LEFT JOIN test2 t2 ON (t1.t1a = t2.t2a)) AS x1
LEFT OUTER JOIN test3 t3 ON (x1.t2a = t3.t3a)) AS x2
WHERE x2.t2a = 1;

The select works under 7.2, but gives the following error in 7.3:

ERROR:  JOIN/ON clause refers to "x1", which is not part of JOIN

thanks,
--Barry



Tom Lane wrote:
> Barry Lind <barry@xythos.com> writes:
> 
>>In testing Neil's PREPARE/EXECUTE patch on my test query, I found the 
>>parser complains that this query is not valid when using current 
>>sources.  The error I get is:
> 
> 
>>psql:testorig.sql:1: ERROR:  JOIN/ON clause refers to "xf2", which is 
>>not part of JOIN
> 
> 
> Hmm.  I have an open bug with sub-SELECTs inside a JOIN, but this
> example doesn't look like it would trigger that.
> 
> 
>>I think the sql is valid (at least it has worked in 7.1 and 7.2).  Is 
>>this a bug?
> 
> 
> Dunno.  Give me a test case (and no, I am *not* going to try to
> reverse-engineer table schemas from that SELECT).
> 
>             regards, tom lane
> 




pgsql-hackers by date:

Previous
From: Curt Sampson
Date:
Subject: Re: 7.3 schedule
Next
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] ANSI Compliant Inserts