Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nIGl2-00018L-9t for pgsql-general@arkaria.postgresql.org; Thu, 10 Feb 2022 21:13:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nIGl0-0005Fd-6Q for pgsql-general@arkaria.postgresql.org; Thu, 10 Feb 2022 21:13:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nIGkz-0005FT-SG for pgsql-general@lists.postgresql.org; Thu, 10 Feb 2022 21:13:37 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nIGkx-0007a9-9B for pgsql-general@lists.postgresql.org; Thu, 10 Feb 2022 21:13:37 +0000 Received: from bruce by momjian.us with local (Exim 4.94.2) (envelope-from ) id 1nIGkv-008SvN-W2 for pgsql-general@lists.postgresql.org; Thu, 10 Feb 2022 16:13:33 -0500 Date: Thu, 10 Feb 2022 16:13:33 -0500 From: Bruce Momjian To: pgsql-general@lists.postgresql.org Subject: Re: Can we go beyond the standard to make Postgres radically better? Message-ID: References: <7117322c-185c-4283-990d-6646d8476409@Spark> <20220210172229.4it7ioddvrtmws37@hjp.at> <20220210172545.f7vtdcrg325v3xlx@hjp.at> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220210172545.f7vtdcrg325v3xlx@hjp.at> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Feb 10, 2022 at 06:25:45PM +0100, Peter J. Holzer wrote: > On 2022-02-10 18:22:29 +0100, Peter J. Holzer wrote: > > On 2022-02-09 21:14:39 -0800, Guyren Howe wrote: > > > • SELECT * - b.a_id from a natural join b > > > □ let me describe a select list by removing fields from a relation. In > > > the example, I get all fields in the join of a and b other than the > > > shared key, which I only get once. > > > > Natural join already does this. > > > > My use case for such a feature are tables which contain one column (or a > > small number of columns) which you usually don't want to select: A bytea > > column or a very wide text column. In a program I don't mind (in fact I > > prefer) listing all the columns explicitely, but exploring a database > > interactively with psql typing lots of column names is tedious > > (especially since autocomplete doesn't work here). > > Forgot to add: I think that the syntax would have to be more explicit. > It's too easy to mix up > SELECT * - b.a_id FROM ... > and > SELECT *, - b.a_id FROM ... > > Maybe > SELECT * EXCEPT b.a_id FROM ... Yes, this was proposed on hackers a few months ago and a patch was proposed: https://www.postgresql.org/message-id/flat/892708.1634233481%40sss.pgh.pa.us#1f17923ad50a1442867162991c54ead9 The last post was from October of 2021 so you can email the author to ask about its status. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com If only the physical world exists, free will is an illusion.