Re: Two columns with same name in subselect--any way to SELECTwithout *?

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Two columns with same name in subselect--any way to SELECTwithout *?
Дата
Msg-id CAKFQuwbNzT7LXttDUWxK3md_hdLTiuPpAmYyrJu36ZwsRaghqQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Two columns with same name in subselect--any way to SELECTwithout *?  (Ken Tanzer <ken.tanzer@gmail.com>)
Список pgsql-general
On Saturday, January 6, 2018, Ken Tanzer <ken.tanzer@gmail.com> wrote:
So having thought about this a little more, it seems like once you create a result set with identically-named columns, those columns are effectively crippled.  In that they can be viewed (via SELECT *), but not referenced, used or acted upon in any way.  Still just wanting to confirm this is/is not the case.  Thanks!

I'm not really following the intent of the question but if your client API allows for column references by position instead of name you can still distinguish between them, too.

In subqueries or CREATE TABLE AS, no, the system, is going to force you to differentiate them since all SQL references are by name.

David J. 

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

Предыдущее
От: Ken Tanzer
Дата:
Сообщение: Re: Two columns with same name in subselect--any way to SELECTwithout *?
Следующее
От: pinker
Дата:
Сообщение: Re: core system is getting unresponsive because over 300 cpu load