pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nikhil Benesch <nikhil.benesch@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Appetite for `SELECT ... EXCLUDE`?
Date: Fri, 18 Nov 2022 15:18:44 -0500
Message-ID: <2262039.1668802724@sss.pgh.pa.us> (raw)
In-Reply-To: <CAPWqQZQNdwYOEZhMP0KKyorgP8rCeuDNT=SG96gyxZQkbBg1hw@mail.gmail.com>
References: <CAPWqQZQNdwYOEZhMP0KKyorgP8rCeuDNT=SG96gyxZQkbBg1hw@mail.gmail.com>

Nikhil Benesch <nikhil.benesch@gmail.com> writes:
> Both DuckDB and Snowflake, as of recently, support a nonstandard `EXCLUDE`
> clause in the SELECT list to allow excluding fields from a wildcard [0] [1].

> Example from the DuckDB announcement [2]:

>    SELECT * EXCLUDE (jar_jar_binks, midichlorians) FROM star_wars

> Is there any appetite for adding this feature to PostgreSQL?

This has been discussed before and not gone anywhere, e.g. [1] [2].
I think there have been more threads but that was all I found in a
quick archive search.  Anyway, as those threads illustrate, there is a
lot of room for variation in how you spell it, where you can write it,
and so on.  My own inclination is to not do anything here until/unless
the SQL committee standardizes something, because there's too much
risk of finding ourselves incompatible with the standard.

			regards, tom lane

[1] https://www.postgresql.org/message-id/flat/d51371a2-f221-1cf3-4a7d-b2242d4dafdb%40gmail.com
[2] https://www.postgresql.org/message-id/flat/CANcm6wbR3EG7t-G%3DTxy64Yt8nR6YbpzFRuTewJQ%2BkCq%3DrZ8M2A...





view thread (3+ messages)  latest in thread

Message-ID: <2262039.1668802724@sss.pgh.pa.us>
Permalink:  ../2262039.1668802724@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2262039.1668802724@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, nikhil.benesch@gmail.com
  Subject: Re: Appetite for `SELECT ... EXCLUDE`?
  In-Reply-To: <2262039.1668802724@sss.pgh.pa.us>
  References: <CAPWqQZQNdwYOEZhMP0KKyorgP8rCeuDNT=SG96gyxZQkbBg1hw@mail.gmail.com> <2262039.1668802724@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox