Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vdDzF-00FYXg-12 for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Jan 2026 20:49:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vdDzC-00AXsV-2D for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Jan 2026 20:49:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vdDzC-00AXs9-1D for pgsql-hackers@lists.postgresql.org; Tue, 06 Jan 2026 20:49:03 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vdDzA-004aib-2z for pgsql-hackers@lists.postgresql.org; Tue, 06 Jan 2026 20:49:02 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 606Kmx9C1619827; Tue, 6 Jan 2026 15:48:59 -0500 From: Tom Lane To: Greg Sabino Mullane cc: "pgsql-hackers@lists.postgresql.org" Subject: Re: [PATCH] Provide support for trailing commas In-reply-to: References: Comments: In-reply-to Greg Sabino Mullane message dated "Tue, 06 Jan 2026 15:35:38 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1619825.1767732539.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 06 Jan 2026 15:48:59 -0500 Message-ID: <1619826.1767732539@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Greg Sabino Mullane writes: > Happy New Year! Please find attached a patch to provide comprehensive > trailing comma support, where we allow (when possible) a comma that does > NOT come before the next item in a list. To wit: > SELECT 1,2,3, FROM pg_class, ORDER BY greatest(relpages,1,); Did we not discuss and reject this very idea in the past? A quick search finds [1][2], and there may be more threads. > This is not as trivial a task as it seems, as those who have dabbled wit= h > our parser (or parsers in general) may suspect. Indeed. I think it carries substantial risk of creating large parsing problems down the road, when we try to integrate whatever random syntax the SQL committee comes up with next. And frankly, I don't agree that it'd be beneficial. regards, tom lane [1] https://www.postgresql.org/message-id/flat/20140928114246.GA22150%40ar= tax.karlin.mff.cuni.cz [2] https://www.postgresql.org/message-id/flat/0368c60f-abe2-4f5f-972d-7cd= 1e6db2382%40gmail.com