Re: Newbie Query question

From: Rod Taylor <pg(at)rbt(dot)ca>
To: Marcel Loose <loose(at)astron(dot)nl>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Newbie Query question
Date: 2004-03-26 14:49:12
Message-ID: 1080312551.338.25.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> However, this query does not give me the result I expected. It appears that
> the database engine first calculates the cartesian product of the tables A
> and B and then evaluates the query. Hence, I get multiple matches for

Yup.. WHERE filters the results of the join.

> Is there any way to do this, other than using UNION??

This is what you want. I think you could come out with what you want in
other ways, but this is by far the most appropriate.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Kemin Zhou 2004-03-26 19:31:27 autocommit
Previous Message Tsoloane Moahloli 2004-03-26 14:19:11 date_part stored procs