Re: Bug #795: null resulting from left join corrupts select - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Bug #795: null resulting from left join corrupts select
Date
Msg-id 24040.1034462170@sss.pgh.pa.us
Whole thread Raw
In response to Bug #795: null resulting from left join corrupts select  (pgsql-bugs@postgresql.org)
List pgsql-bugs
pgsql-bugs@postgresql.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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bug #796: Problem after upgrading to v. 723
Next
From: Joe Conway
Date:
Subject: Re: Creating server-side functions: one simple error