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

2017-09-01 Thread Ken Tanzer
> > ...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.postgre

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

2017-09-01 Thread Tom Lane
... btw, a little digging shows that this ordering is required by the SQL standard. The least excruciating version of the relevant text is in SQL92 7.5 : d) Let SLCC be a of s of the form COALESCE ( TA.C, TB.C ) AS C for every column C that is a corre

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

2017-09-01 Thread Tom Lane
"David G. Johnston" writes: > On Fri, Sep 1, 2017 at 2:25 PM, Ken Tanzer wrote: >> Hi. I recently noticed that when doing a SELECT * with USING, that the >> join field(s) appear first in the output. I'd never noticed that before, >> and was just curious if that is expected behavior or not. Tha

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

2017-09-01 Thread David G. Johnston
On Fri, Sep 1, 2017 at 2:25 PM, Ken Tanzer wrote: > Hi. I recently noticed that when doing a SELECT * with USING, that the > join field(s) appear first in the output. I'd never noticed that before, > and was just curious if that is expected behavior or not. Thanks. > ​I don't recall if or whe

[GENERAL] Fields re-ordered on JOIN with * and USING

2017-09-01 Thread Ken Tanzer
Hi. I recently noticed that when doing a SELECT * with USING, that the join field(s) appear first in the output. I'd never noticed that before, and was just curious if that is expected behavior or not. Thanks. Ken CREATE TEMP TABLE t1 ( f1 INTEGER, f2 INTEGER UNIQUE, f3 INTEGER, f4 INT