Re: [HACKERS] Bug on complex join

From: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
To: phd2(at)earthling(dot)net
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Bug on complex join
Date: 1999-03-05 15:07:08
Message-ID: 36DFF31C.1E51F679@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 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.
> 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

Why did you change both the target columns *and* the query qualification
between these two examples? Is the "SELECT d.*" required to get the
query to fail?? If not, then...

For some reason sh.distr_id is not equal to d.distr_id. Are they
different data types? Do they have some embedded blanks?? Probably not a
Postgres bug, since the query itself looks pretty simple...

- Tom

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Broytmann 1999-03-05 15:13:50 Re: [HACKERS] Bug on complex join
Previous Message Tom Lane 1999-03-05 15:03:50 Re: [HACKERS] Re: Your recent message to Topica.com