RE: prefer (+) oracle notation. Let's use standard and that's it

From: "Edmar Wiggers" <edmar(at)brasmap(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-general" <pgsql-general(at)postgresql(dot)org>
Subject: RE: prefer (+) oracle notation. Let's use standard and that's it
Date: 2000-10-20 02:46:54
Message-ID: NEBBIAKDCDHFGJMLHCKIMEHLCAAA.edmar@brasmap.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Got it. Thanks. Even though I'd never seen it like that, it is indeed
ambiguous.

In Oracle,

> where
> a.id = b.id(+) and
> (b.weight > 10 OR b IS NULL);

is equivalent to

> ... FROM a LEFT JOIN b ON (a.id = b.id) WHERE b.weight > 10

That is, we get row 2,NULL,NULL.

To produce

> ... FROM a LEFT JOIN b ON (a.id = b.id AND b.weight > 10)

you have to use "in-line views" (Oracle term), like

... FROM a, (select * from table_b where b.weight > 10) b
WHERE a.id = b.id(+);

I guess that finishes it. Let's use STANDARD syntax and that's it. I guess
postgres would need a lot of massage on query parsing to get oracle's
mysterious syntax right.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2000-10-20 04:53:01 Re: [ANNOUNCE] Open Source Database Summit
Previous Message Tom Lane 2000-10-20 02:08:01 Re: oracle ambiguity, inline views