Re: Why is this a cross join? - Mailing list pgsql-general

From Kevin Grittner
Subject Re: Why is this a cross join?
Date
Msg-id 1361205685.67194.YahooMailNeo@web162906.mail.bf1.yahoo.com
Whole thread Raw
In response to Re: Why is this a cross join?  (Tim Uckun <timuckun@gmail.com>)
Responses Re: Why is this a cross join?  (Tim Uckun <timuckun@gmail.com>)
List pgsql-general
Tim Uckun <timuckun@gmail.com> wrote:=0A=0A> I guess I am not explaining it=
 properly..=0A>=0A> Say I created new columns on both tables called "first_=
6" and=0A> populated them with the substrings.=A0 If I did a inner join or =
a=0A> left join on those fields would I still get a cross join?=0A>=0A> inn=
er join model_configurations mc on mc.first_6 =3D crm.first_6=0A=0AAs other=
s have said, that would not change the results -- you are=0Agetting exactly=
 what you are requesting, but apparently not what=0Ayou want.=A0 Can you ex=
plain what it is that you do want?=A0 If you=0Ahave ten rows in one table w=
ith the same "first six" value, and 20=0Arows in the other table with that =
same "first six" value, how do=0Ayou want them to be matched up?=A0 Do you =
want one row in the result=0Afor every row in one of the tables?=A0 If so, =
how do you want to=0Adetermine which of the matching rows in the other tabl=
e to choose,=0Aand which to ignore?=0A=0A-- =0AKevin Grittner=0AEnterpriseD=
B: http://www.enterprisedb.com=0AThe Enterprise PostgreSQL Company

pgsql-general by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: could not link file "pg_xlog/xlogtemp.72606"
Next
From: Denis Papathanasiou
Date:
Subject: How to index xml type column queries effectively?