pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: ai <listar@mail.ru>
To: 'Tom Lane' <tgl@sss.pgh.pa.us>
Cc: 'Kevin Grittner' <Kevin.Grittner@wicourts.gov>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6154: wrong result with nested left-joins
Date: Tue, 9 Aug 2011 12:04:15 +0700
Message-ID: <01fb01cc5651$cc6a25b0$653e7110$@mail.ru> (raw)
In-Reply-To: <5932.1312865600@sss.pgh.pa.us>
References: <201108081313.p78DDX6W021751@wwwmaster.postgresql.org>
	<4E3FA39B020000250003FC1F@gw.wicourts.gov>
	<25701.1312815692@sss.pgh.pa.us>
	<01bc01cc55e0$4592ddf0$d0b899d0$@mail.ru>
	<4E3FD730020000250003FC3D@gw.wicourts.gov>
	<9240.1312827077@sss.pgh.pa.us>
	<5932.1312865600@sss.pgh.pa.us>

Thank you! =)

Best Regards, Alex


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

I wrote:
> "Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
>> "ai" <listar@mail.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




view thread (11+ messages)

Message-ID: <01fb01cc5651$cc6a25b0$653e7110$@mail.ru>
Permalink:  ../01fb01cc5651$cc6a25b0$653e7110$@mail.ru/
Also on:    postgresql.org/message-id/01fb01cc5651$cc6a25b0$653e7110$@mail.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: listar@mail.ru, tgl@sss.pgh.pa.us, Kevin.Grittner@wicourts.gov
  Subject: Re: BUG #6154: wrong result with nested left-joins
  In-Reply-To: <01fb01cc5651$cc6a25b0$653e7110$@mail.ru>
  References: <201108081313.p78DDX6W021751@wwwmaster.postgresql.org> <4E3FA39B020000250003FC1F@gw.wicourts.gov> <25701.1312815692@sss.pgh.pa.us> <01bc01cc55e0$4592ddf0$d0b899d0$@mail.ru> <4E3FD730020000250003FC3D@gw.wicourts.gov> <9240.1312827077@sss.pgh.pa.us> <5932.1312865600@sss.pgh.pa.us> <01fb01cc5651$cc6a25b0$653e7110$@mail.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox