Re: bug in JOIN or COUNT or ... ? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: bug in JOIN or COUNT or ... ?
Date
Msg-id 21858.989717677@sss.pgh.pa.us
Whole thread Raw
In response to bug in JOIN or COUNT or ... ?  (The Hermit Hacker <scrappy@hub.org>)
Responses Re: bug in JOIN or COUNT or ... ?
List 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


pgsql-hackers by date:

Previous
From: Mark Hollomon
Date:
Subject: Re: State of PL/Python build
Next
From: Marko Kreen
Date:
Subject: Re: bug in pgcrypto 0.3