Skip site navigation (1) Skip section navigation (2)

Re: BUG #6154: wrong result with nested left-joins

From: "ai" <listar(at)mail(dot)ru>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "'Kevin Grittner'" <Kevin(dot)Grittner(at)wicourts(dot)gov>,<pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #6154: wrong result with nested left-joins
Date: 2011-08-09 05:04:15
Message-ID: 01fb01cc5651$cc6a25b0$653e7110$@mail.ru (view raw or flat)
Thread:
Lists: pgsql-bugs
Thank you! =)

Best Regards, Alex


-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us] 
Sent: Tuesday, August 09, 2011 11:53 AM
To: ai
Cc: Kevin Grittner; pgsql-bugs(at)postgresql(dot)org
Subject: Re: [BUGS] BUG #6154: wrong result with nested left-joins 

I wrote:
> "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
>> "ai" <listar(at)mail(dot)ru> wrote:
>>> Oops.. I just saw, that I send you "correct" (already with 
>>> "workaround") sql-code instead of "wrong"...
>>> here is "wrong" (difference is in "SELECT sub3.key3, sub4.value2 
>>> FROM" ):
 
>> OK, that is still happening, and looks wrong to me.

> Yeah, I see it too.  It seems to be evaluating the placeholder for the 
> COALESCE expression at the wrong join level.  Not sure why, yet.

Found it --- the code only fails for the case where the COALESCE
subexpression is referenced in the upper targetlist, but not the quals (ie,
not ON or WHERE).  Patch committed, thanks for the report!

			regards, tom lane


In response to

pgsql-bugs by date

Next:From: aiDate: 2011-08-09 05:17:49
Subject: Re: BUG #6155: literal definition of arrays with double qoutes leads to error
Previous:From: Tom LaneDate: 2011-08-09 05:02:20
Subject: Re: BUG #6155: literal definition of arrays with double qoutes leads to error

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group