Re:

From: Erik Jones <ejones(at)engineyard(dot)com>
To: Waldemar Bergstreiser <littlesuspense(at)web(dot)de>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, pgsql-general(at)postgresql(dot)org, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Subject: Re:
Date: 2009-06-30 17:22:23
Message-ID: 453FAEE2-5DD1-41F9-8485-2C8BCEFA12D0@engineyard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

  • Re: at 2009-06-30 11:14:10 from Waldemar Bergstreiser

Responses

  • Re: at 2009-06-30 18:25:47 from David Fetter
  • Re: at 2009-06-30 18:42:26 from Merlin Moncure

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-06-30 17:24:51 Re: BETWEEN not matching on timestamp value
Previous Message James B. Byrne 2009-06-30 17:17:29 BETWEEN not matching on timestamp value