pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Outer join statement ?
2+ messages / 2 participants
[nested] [flat]

* Outer join statement ?
@ 2000-08-30 21:44  Nasdaq <fb@techbourse.com>
  0 siblings, 1 reply; 2+ messages in thread

From: fb@techbourse.com @ 2000-08-30 21:44 UTC (permalink / raw)
  To: pgsql-sql

The statement "Outer Join" is not available in Postgres ?
Is there an extension provided by a third company that implement this 
functionnality ?

If not do you know when this functionnality will be available in 
Postgres ?

Thank

Fred

-- 
TechBourse : le premier site en FRANCAIS dédié le NASDAQ
http://www.techbourse.com



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Outer join statement ?
@ 2000-08-31 06:54  Alexandru COSTIN <acostin@rds.ro>
  parent: Nasdaq <fb@techbourse.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Alexandru COSTIN @ 2000-08-31 06:54 UTC (permalink / raw)
  To: pgsql-sql

    Hello,
    There are 2 ways of doing outer joins, both are relatively expensive
from the CPU time point of view
    1. Create a function that returns the ojined value, or null if the value
does not exists in the secod table
    2. Use a union beetwen a left join and a straight select with a where
condition. Next there's an example inspired from the Adison Westley book (I
suggest you grab a copy from the postgresql site. (/docs)

    select customer.name,salesorder.order_id from customer join salesorder
on customer.cust_id=salesorder.fk_cust_id union all select
customer.name,null::int4 from customer where customer.cust_id not in (select
fk_cust_id from salesorder);

    Probably an improvement here is to use exists on the second select, but
I didn't have the time to document.
    Anyway, this will not work embedded in a view ("union all" is not
supported in views).

                Alexander

"Nasdaq" <fb@techbourse.com> wrote in message
news:fb-3008002344340001@du-211-67.lyon.dialup.freesurf.fr...
> The statement "Outer Join" is not available in Postgres ?
> Is there an extension provided by a third company that implement this
> functionnality ?
>
> If not do you know when this functionnality will be available in
> Postgres ?
>
> Thank
>
> Fred
>
> --
> TechBourse : le premier site en FRANCAIS dédié le NASDAQ
> http://www.techbourse.com





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2000-08-31 06:54 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-08-30 21:44 Outer join statement ? Nasdaq <fb@techbourse.com>
2000-08-31 06:54 ` Alexandru COSTIN <acostin@rds.ro>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox