Re: [HACKERS] Outer Joins (and need CASE help)

From: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
To: "Jackson, DeJuan" <djackson(at)cpsgroup(dot)com>
Cc: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>, Postgres Hackers List <hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Outer Joins (and need CASE help)
Date: 1999-01-08 05:32:01
Message-ID: 36959851.A8B981B3@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I could be wrong (I don't have a copy of the standard), but I don't
> believe that the above syntax follows the standard. Let me know if
> I'm wrong, but my understanding of the syntax would be more like:
> SELECT * FROM t1 JOIN t2 ON (t1.i = t2.i);
> with the same result set as you listed (t2.i isn't suppressed).
> This would have a difference in approach from the above. If I wanted
> to join on columns with different names I couldn't use your syntax (as
> one example).

The standard allows both syntaxes; USING is simpler to type, and ON is
more general, as you point out.

In fact, the standard is annoyingly helpful in allowing multiple ways to
write the same query. Makes the parsing and parse tree transformation
more complicated :(

- Tom

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 1999-01-08 06:17:03 Re: [HACKERS] Re: [PORTS] vacuum takes too long
Previous Message Jackson, DeJuan 1999-01-07 21:46:02 RE: [HACKERS] ["G. Jayson Stangel" <jayson@biztown.com>] Question s?