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

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: A modest proposal vis hierarchical queries: MINUS in the column list
Дата
Msg-id 81b57a6b-9245-e603-6edf-56d52f3d2c38@dunslane.net
обсуждение исходный текст
Ответ на Re: A modest proposal vis hierarchical queries: MINUS in the column list  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: A modest proposal vis hierarchical queries: MINUS in the column list  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 6/7/21 6:10 PM, Tom Lane wrote:
> "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.
>
>             



True, but the problem happens when you have 250 fields and you want to
skip 4 of them. Getting that right can be a pain.


I agree that inventing syntax for this has the dangers you identify.


cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com




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

Предыдущее
От: Emre Hasegeli
Дата:
Сообщение: Re: GiST operator class for bool
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Multiple hosts in connection string failed to failover in non-hot standby mode