RE: prefer (+) oracle notation. Let's use standard and that's it - Mailing list pgsql-general

From Edmar Wiggers
Subject RE: prefer (+) oracle notation. Let's use standard and that's it
Date
Msg-id NEBBIAKDCDHFGJMLHCKIMEHLCAAA.edmar@brasmap.com
Whole thread Raw
In response to Re: prefer (+) oracle notation  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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.


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: oracle ambiguity, inline views
Next
From: Bruce Momjian
Date:
Subject: Re: [ANNOUNCE] Open Source Database Summit