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>, "'Kevin Grittner'" <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #6154: wrong result with nested left-joins
Date: 2011-08-08 15:08:05
Message-ID: 01bb01cc55dc$fdd78db0$f986a910$@mail.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

SELECT VERSION();
produces
"PostgreSQL 8.4.5 on x86_64-pc-linux-gnu, compiled by GCC
x86_64-pc-linux-gnu-gcc (Gentoo 4.4.4-r2 p1.3, pie-0.4.5) 4.4.4, 64-bit"

Best regards,
Alex

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Monday, August 08, 2011 10:02 PM
To: Kevin Grittner
Cc: listar; pgsql-bugs(at)postgresql(dot)org
Subject: Re: [BUGS] BUG #6154: wrong result with nested left-joins

"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
> "listar" <listar(at)mail(dot)ru> wrote:
>> PostgreSQL version: 8.4.5

>> Description: wrong result with nested left-joins

>> And this is the problem - value2 can't be NULL because of COALESCE in
>> sub4 (at least I think that it can't be =))

> This works correctly in release 9.0.4 and development HEAD. I don't
> still have any machines handy which are running 8.4, but you might
> want to try it on the latest bug-fix version of 8.4 (currently
> 8.4.8) to see if the fix was back-patched.

It works for me too in 8.4.recent; but I believe the relevant fix is in
8.4.5, which makes me doubt the OP's report of his server version.

http://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=dc9cc887b7
4bfa0d40829c4df66dead509fdd8f6

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2011-08-08 15:08:07 Re: Help-PGRES_FATAL_ERROR
Previous Message Tom Lane 2011-08-08 15:01:32 Re: BUG #6154: wrong result with nested left-joins