Re: alter table add column - specify where the column will go?
В списке pgsql-general по дате отправления:
| От | Daniel Verite |
|---|---|
| Тема | Re: alter table add column - specify where the column will go? |
| Дата | |
| Msg-id | eceaf1e4-e485-4cb2-b587-d1dfacd7ab93@mm обсуждение исходный текст |
| Ответ на | Re: alter table add column - specify where the column will go? (Fredric Fredricson <Fredric.Fredricson@bonetmail.com>) |
| Список | pgsql-general |
Fredric Fredricson wrote: > But if you change the column names in the second SELECT in the UNION this is > ignored: > # SELECT c1,c2 FROM (SELECT 1 AS c1, 2 AS c2 UNION SELECT 2 AS c3, 1 AS c4) > AS x; > c1 | c2 > ----+---- > 1 | 2 > 2 | 1 > Apparently, in a UNION the column names are derived from the first statement > only. The example upthread demonstrates that in certain contexts, column positions are relevant whereas column names are not. The modified query you show here doesn't lead to any different conclusion. The allegation that row.* doesn't come with a deterministic column order remains pretty much unsubstantiated at this point. Best regards, -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера