Re: A modest proposal vis hierarchical queries: MINUS in the column list

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: A modest proposal vis hierarchical queries: MINUS in the column list
Дата
Msg-id 1029014.1623103858@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: A modest proposal vis hierarchical queries: MINUS in the column list  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: A modest proposal vis hierarchical queries: MINUS in the column list  (Julien Rouhaud <rjuju123@gmail.com>)
Re: A modest proposal vis hierarchical queries: MINUS in the column list  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Mon, Jun 7, 2021 at 1:54 PM Mark Zellers <mark.zellers@workday.com>
> wrote:
>> What if you could use the MINUS keyword in the column
>> list of a select statement to remove a column from the result set returned
>> to the client?

> I asked this a decade ago and got no useful responses.
>
https://www.postgresql.org/message-id/flat/02e901cc2bb4%2476bc2090%24643461b0%24%40yahoo.com#3784fab26b0f946b3239266e3b70a6ce

I can recall more-recent requests for that too, though I'm too lazy
to go search the archives right now.

I'm fairly disinclined to do anything about it though, because I'm
afraid of the SQL committee standardizing some other syntax for the
same idea in future (or maybe worse, commandeering the same keyword
for some other feature).  It doesn't seem quite valuable enough to
take those risks for.

Note that it's not like SQL hasn't heard of projections before.
You can always do "SELECT a, b, d FROM subquery-yielding-a-b-c-d".
So the proposed syntax would save a small amount of typing, but
it's not adding any real new functionality.

            regards, tom lane



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Add PortalDrop in exec_execute_message
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Add PortalDrop in exec_execute_message