Re: Proposition for autoname columns

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Proposition for autoname columns
Дата
Msg-id 9e6765a2-4908-f77f-e63f-0eee3882a482@dunslane.net
обсуждение исходный текст
Ответ на Re: Proposition for autoname columns  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: Proposition for autoname columns
Re: Proposition for autoname columns
Список pgsql-hackers
On 11/12/20 11:12 AM, David G. Johnston wrote:
> On Thu, Nov 12, 2020 at 8:59 AM Andrew Dunstan <andrew@dunslane.net
> <mailto:andrew@dunslane.net>> wrote:
>
>
>
>     So if we then say:
>
>
>         select x, j->>x from mytable;
>
>
>     you want both result columns named x? That seems like a recipe for
>     serious confusion. I really don't think this proposal has been
>     properly
>     thought through.
>
>
> IMO It no worse than today's:
>
> select count(*), count(*) from (values (1), (2)) vals (v);
> count | count
> 2 | 2
>


I guess the difference here is that there's an extra level of
indirection. So


select x, j->>'x', j->>x from mytable


would have 3 result columns all named x.


cheers


andrew







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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Proposition for autoname columns
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Proposition for autoname columns