Bug on complex join

From: Oleg Broytmann <phd(at)sun(dot)med(dot)ru>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Bug on complex join
Date: 1999-03-05 13:13:12
Message-ID: Pine.SOL2.3.96.SK.990305160649.12292A-100000@sun.med.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi!

I am continuing playing with the query (I reduced it to):
SELECT sh.distr_id , d.distr_id
FROM central cn, shops sh, districts d
WHERE cn.shop_id = sh.shop_id

and got 27963 rows. I filtered it out (with awk:) where $1 == $2 (1st
column is equal to second) and got 3104 rows.

But the query
SELECT d.*
FROM central cn, shops sh, districts d
WHERE cn.shop_id = sh.shop_id AND sh.distr_id = d.distr_id

returned 0 rows.

Where is the bug?

Oleg.
----
Oleg Broytmann http://members.xoom.com/phd2/ phd2(at)earthling(dot)net
Programmers don't die, they just GOSUB without RETURN.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-03-05 15:03:50 Re: [HACKERS] Re: Your recent message to Topica.com
Previous Message Jan Wieck 1999-03-05 09:59:48 Re: [HACKERS] for row in select loop question