Re: Fields re-ordered on JOIN with * and USING

From: Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Fields re-ordered on JOIN with * and USING
Date: 2017-09-02 01:45:13
Message-ID: CAD3a31XdoGO_9LgF=G92e=KQF3ThcWKeBQvyb5UYyqD5-cD9XA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
> ...least excruciating version of the relevant text...

Ouch, I'm glad you folks take care of reading such stuff! What you put in
the documentation was much much clearer--just wish I had found it!

Speaking of which, I had looked at the "From" section of the "SELECT" page (
https://www.postgresql.org/docs/current/static/sql-select.html#SQL-FROM),
which also has a somewhat detailed section on joins. I'm wondering about
the utility of:

- Adding a link from the "SELECT" page (FROM section) to the page Tom
referenced (which includes a link the other way)

and/or

- Adding this detail to the section on USING on the select page:

A clause of the form USING ( a, b, ... ) is shorthand for ON left_table.a =
right_table.a AND left_table.b = right_table.b .... Also, USING implies
that only one of each pair of equivalent columns will be included in the
join output, not both. *Outcome columns specified by USING will appear
first in the joined results.*

Cheers,
Ken

>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Олег Самойлов 2017-09-02 14:16:05 Numeric numbers
Previous Message Tom Lane 2017-09-02 01:14:38 Re: Fields re-ordered on JOIN with * and USING