strange behvaviour in join? BUG in 7.02? - Mailing list pgsql-general

From Radoslaw Stachowiak
Subject strange behvaviour in join? BUG in 7.02?
Date
Msg-id 20001110114320.J5821@blue.alter.pl
Whole thread Raw
Responses Re: strange behvaviour in join? BUG in 7.02?  ("Oliver Elphick" <olly@lfix.co.uk>)
List pgsql-general
I have PSQL 7.02

classic join on Two tables:

select l.id from linia l,lk_strefa2linia lk
where l.id = lk.fk_linia and lk.fk_strefa=5;

gives correct linia.ids.

but
select linia.id from linia l,lk_strefa2linia lk
where l.id = lk.fk_linia and lk.fk_strefa=5;

(the only difference is second word: linia.id instead l.id)
will give totaly different results).

tables definitions:

mlotdev=> \d lk_strefa2linia
    Table "lk_strefa2linia"
 Attribute |  Type   | Modifier
-----------+---------+----------
 fk_strefa | integer | not null
 fk_linia  | integer | not null
Index: lk_strefa2linia_ukey

mlotdev=> \d linia
                             Table "linia"
 Attribute |    Type     |                  Modifier
-----------+-------------+---------------------------------------------
 id        | integer     | not null default nextval('seq_linia'::text)
 fk_typ    | integer     | not null
 numer     | char(10)    | not null
 status    | char(1)     | not null default '?'
 stamp     | timestamp   | not null default now()
 opis      | varchar(64) | not null
 skrot     | varchar(16) | not null
Index: linia_pkey


Please CC answer to me. Thanx!

--
radoslaw.stachowiak.........................................http://alter.pl/

pgsql-general by date:

Previous
From: Igor Roboul
Date:
Subject: Re: Increasing the number of semaphores on FreeBSD 4.1 (clarification)
Next
From: Chris Picton
Date:
Subject: bug?