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

Поиск
Список
Период
Сортировка
От Ken Tanzer
Тема [GENERAL] Fields re-ordered on JOIN with * and USING
Дата
Msg-id CAD3a31W0mJHWNuvec-NSSSFUbABwJFp=ued_UYUqAM3vbP0i5Q@mail.gmail.com
обсуждение исходный текст
Ответы Re: [GENERAL] Fields re-ordered on JOIN with * and USING
Список pgsql-general
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 INTEGER
);

CREATE TEMP TABLE t2 (
  f2 INTEGER,
  f3 INTEGER,
  f5 INTEGER
);

SELECT * FROM t1 LEFT JOIN t2 USING (f3,f2);

 f3 | f2 | f1 | f4 | f5 
----+----+----+----+----
(0 rows)



-- 
AGENCY Software  
A Free Software data system
By and for non-profits
(253) 245-3801

learn more about AGENCY or
follow the discussion.

В списке pgsql-general по дате отправления: