Re: bug in JOIN or COUNT or ... ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: The Hermit Hacker <scrappy(at)hub(dot)org>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: bug in JOIN or COUNT or ... ?
Date: 2001-05-13 01:34:37
Message-ID: 21858.989717677@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ah, I see it: your join against relationship_wanted isn't unique.

globalmatch=# select count(*) from personal_data pd
globalmatch-# where pd.gid = 17111 AND pd.gender = 0;
count
-------
1
(1 row)

globalmatch=# select count(*) from relationship_wanted rw
globalmatch-# where rw.gid = 17111 AND rw.gender = 0;
count
-------
5
(1 row)

globalmatch=#

So that inflates the number of rows coming out of the join by 5.

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 2001-05-13 01:39:29 Re: bug in JOIN or COUNT or ... ?
Previous Message Bruce Momjian 2001-05-13 01:34:09 Re: Re: Regression tests for OBSD scrammed..