Re: Bug #795: null resulting from left join corrupts select

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: karsten(dot)merkle(at)artundweise(dot)de, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug #795: null resulting from left join corrupts select
Date: 2002-10-12 22:36:10
Message-ID: 24040.1034462170@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

pgsql-bugs(at)postgresql(dot)org writes:
> select
> *
> from
> test1 left join test2 on (test1.test1_id = test2.test1_id)
> where
> test1.test1_id = test2.test1_id;

> test1_id | test2_id | test1_id
> ----------+----------+----------
> 1 | 1 | 1
> 2 | |

This is fixed for 7.3. If you need a fix now, the diff should work in
7.2 as well ... but I haven't tried it. See
http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/optimizer/util/relnode.c.diff?r1=1.39&r2=1.40&f=c

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Joe Conway 2002-10-14 01:07:04 Re: Creating server-side functions: one simple error
Previous Message Tom Lane 2002-10-12 16:22:10 Re: Bug #796: Problem after upgrading to v. 723