Re: - Mailing list pgsql-general

From Erik Jones
Subject Re:
Date
Msg-id 453FAEE2-5DD1-41F9-8485-2C8BCEFA12D0@engineyard.com
Whole thread Raw
In response to Re:  (Waldemar Bergstreiser <littlesuspense@web.de>)
Responses Re:
Re:
List pgsql-general
On Jun 30, 2009, at 4:14 AM, Waldemar Bergstreiser wrote:

>> I don't get it either.  by *= do you mean the Oracle-style outer
>> join?
>> in which case why is this not just
>>
>> select * from a,
>> left outer join b on (a.b_id = b.id)
>> left outer join c on (b.c_id = c.id)
>> left outer join d on (a.d_id = d.id)
>> left outer join f  on (d.f_id = f.id)
>>

<snip>

>
>>> select * from a left outer join b on (a.b_id=b.id) ....
>>>
>>> But I don't see any clear way to specify that table C should be
>>> outer joined only if we got a row from table B.
>>
>> Well that would be the default since if you get no row from b b.c_id
>> will be null.
>>
>
> and if I have a row in table C where c.id is null? A don't know.

No, it's perfectly clear as 'NULL = NULL' evaluates to false:

postgres=# select null = null;
  ?column?
----------

(1 row)

Erik Jones, Database Administrator
Engine Yard
Support, Scalability, Reliability
866.518.9273 x 260
Location: US/Pacific
IRC: mage2k






pgsql-general by date:

Previous
From: "James B. Byrne"
Date:
Subject: BETWEEN not matching on timestamp value
Next
From: Tom Lane
Date:
Subject: Re: BETWEEN not matching on timestamp value