Re: [HACKERS] Enhancing PGSQL to be compatible with Informix SQL

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: "Ansley, Michael" <Michael(dot)Ansley(at)intec(dot)co(dot)za>
Cc: "'The Hermit Hacker '" <scrappy(at)hub(dot)org>, "'Bruce Momjian '" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "'Don Baccus '" <dhogaza(at)pacifier(dot)com>, "'Rod Chamberlin '" <rod(at)querix(dot)com>, "'pgsql-hackers(at)postgreSQL(dot)org '" <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Enhancing PGSQL to be compatible with Informix SQL
Date: 2000-01-06 23:47:06
Message-ID: 3875297A.A2F1DF1E@tm.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Ansley, Michael" wrote:
>
> >> > Yes, OUTER is an Informix-ism. Oracle uses *=. I think the first is
> >> > easier to add and makes more sense for us. *= could be defined by
> >> > someone as an operator, and overloading our already complex operator
> >> > code to do *= for OUTER may be too complex for people to understand.
> >> >
> >> > It would be:
> >> >
> >> > SELECT *
> >> > FROM tab1, OUTER tab2
> >> > WHERE tab1.col1 = tab2.col2
> >>
> >> What about >2 table joins? Wish I had my book here, but I though tyou
> >> could do multiple OUTER joins, no?
>
> Oracle uses a syntax which I quite like. The query above would become:
>
> SELECT *
> FROM tab, tab2
> WHERE tab1.col1 = tab2.col2 (+)
>
> I've actually used queries something like this:
>
> SELECT blah, blah, blah
> FROM t1, t2, t3, t4
> WHERE t1.start_date BETWEEN t2.start_date (+) AND t2.end_date (+)
> AND t1.y = t2.y (+)
> AND t3.x (+) = t1.x
> AND t3.y (+) = t1.y
> AND t4.x = t1.x;
>
> For example...
>
> I realise that this is not standard, but it's easy to read, and easy to
> develop.

I completely agree that Oracle has got it in a very clear, readable and
understandable way.

When I used MS Access (supposedly ANSI) I always created the outer join
queries
using the graphical tool and also had to examine it using said tool, because
all
these LEFT OUTER JOIN ON .... introduced too much line noise for me to be able
to understand what was actually meant.

OTOH, just marking the "outer" side with (+) was easy both to to read and
write.

So I would very much like to have the Oracle syntax for outer joins as well.

IMHO the ANSI standard (as anything designed by a committee) is not always the
best
way to do things.

--------------
Hannu

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 2000-01-07 00:09:58 RE: [HACKERS] Proposed cleanup of index-related planner estimation procedures
Previous Message Lamar Owen 2000-01-06 23:29:57 [Fwd: Re: First Major Open Source Database]