Search Postgresql Archives

Re:

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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






--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux