SQL question - duplicate records from join - Mailing list pgsql-general

From Raymond O'Donnell
Subject SQL question - duplicate records from join
Date
Msg-id 3C7E7B0F.16439.137F870@localhost
Whole thread Raw
Responses Re: SQL question - duplicate records from join
List pgsql-general
Hi all,

I recently upgraded to Postgres 7.1 (having finally found the correct
pg_dump!), and now I notice that joins are returning duplicate
records. A typical query would be:

  select i.itemcode, i.itemname, d.deptname, r.roomname
  from items i
    inner join departments d on (i.deptcode=d.deptcode)
    inner join rooms r on (i.roomcode=r.roomcode)
  where... (etc)

This query returns four copies of each record, where before I just
got one as I'd expect. Am I doing something wrong here?

Thanks for all your help.

--Ray.


--------------------------------------
Raymond O'Donnell
rod@iol.ie
rod@gti.ie
--------------------------------------

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Defunct postmasters
Next
From: Holger Marzen
Date:
Subject: Re: Defunct postmasters