[BUGS] BUG #6154: wrong result with nested left-joins

2011-08-08 Thread listar
The following bug has been logged online: Bug reference: 6154 Logged by: listar Email address: lis...@mail.ru PostgreSQL version: 8.4.5 Operating system: Linux 2.6.36-gentoo-r5 Description:wrong result with nested left-joins Details: It's hard to explain, but easy

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

2011-08-08 Thread Kevin Grittner
listar lis...@mail.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

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

2011-08-08 Thread ai
, August 08, 2011 8:52 PM To: listar; pgsql-bugs@postgresql.org Subject: Re: [BUGS] BUG #6154: wrong result with nested left-joins listar lis...@mail.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

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

2011-08-08 Thread Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: listar lis...@mail.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

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

2011-08-08 Thread ai
Grittner Cc: listar; pgsql-bugs@postgresql.org Subject: Re: [BUGS] BUG #6154: wrong result with nested left-joins Kevin Grittner kevin.gritt...@wicourts.gov writes: listar lis...@mail.ru wrote: PostgreSQL version: 8.4.5 Description:wrong result with nested left-joins

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

2011-08-08 Thread ai
Lane [mailto:t...@sss.pgh.pa.us] Sent: Monday, August 08, 2011 10:02 PM To: Kevin Grittner Cc: listar; pgsql-bugs@postgresql.org Subject: Re: [BUGS] BUG #6154: wrong result with nested left-joins Kevin Grittner kevin.gritt...@wicourts.gov writes: listar lis...@mail.ru wrote: PostgreSQL version

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

2011-08-08 Thread Kevin Grittner
ai lis...@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. The outermost LEFT JOIN is between this:

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

2011-08-08 Thread ai
Kevin and all others, thanks for your work! -Original Message- From: Kevin Grittner [mailto:kevin.gritt...@wicourts.gov] Sent: Tuesday, August 09, 2011 12:32 AM To: ai; 'Tom Lane' Cc: pgsql-bugs@postgresql.org Subject: RE: [BUGS] BUG #6154: wrong result with nested left-joins ai lis

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

2011-08-08 Thread Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: ai lis...@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

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

2011-08-08 Thread Tom Lane
I wrote: Kevin Grittner kevin.gritt...@wicourts.gov writes: ai lis...@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

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

2011-08-08 Thread ai
Thank you! =) Best Regards, Alex -Original Message- From: Tom Lane [mailto:t...@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