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 1vibu6-00B6EK-06 for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Jan 2026 17:22:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vibu5-008PHV-0T for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Jan 2026 17:22:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vibu4-008PHN-2k for pgsql-hackers@lists.postgresql.org; Wed, 21 Jan 2026 17:22:01 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vibu3-001krp-0N for pgsql-hackers@lists.postgresql.org; Wed, 21 Jan 2026 17:22:00 +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 60LHLt132228786; Wed, 21 Jan 2026 12:21:55 -0500 From: Tom Lane To: Peter Eisentraut cc: Greg Sabino Mullane , "pgsql-hackers@lists.postgresql.org" Subject: Re: [PATCH] Provide support for trailing commas In-reply-to: <4042a046-3dc9-4fc6-bfc6-62beb8492f27@eisentraut.org> References: <4042a046-3dc9-4fc6-bfc6-62beb8492f27@eisentraut.org> Comments: In-reply-to Peter Eisentraut message dated "Wed, 21 Jan 2026 17:59:29 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2228784.1769016115.1@sss.pgh.pa.us> Date: Wed, 21 Jan 2026 12:21:55 -0500 Message-ID: <2228785.1769016115@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Peter Eisentraut writes: > On 06.01.26 21:35, Greg Sabino Mullane wrote: >> tl;dr Provide support for trailing commas, where possible and practical. > I was planning to work on this, so thanks for taking the heat. ;-) ... > I took the above summary to the SQL standard committee in September > (2025) and asked for a straw pool on how to proceed, in terms of the > standard. The clear answer was that the standard committee was not > interested. > This was mostly expected by me, but it also now gives us clarity that we > would not get ahead of the standard with this, as is sometimes raised as > a concern. I'm somewhat more worried about the opposite case: that the committee standardizes some syntax that cannot be combined with trailing commas without ambiguity. (I don't have an example of a plausible issue, but that doesn't mean there isn't one.) With that in mind, I'd be happier if the change were as narrow as possible, rather than as-wide-as-possible. I particularly don't like allowing trailing commas in function calls, which for some reason feels to me like an especially-likely-to-be-ambiguous case. Maybe it's because it could help mask mistakes like incorrect parenthesis nesting. If we restrict it to trailing commas in SELECT lists, I'd be willing to hold my nose (and you cite some other products that seem to have made the same decision). But I think we'll have cause to regret the approach Greg is proposing. regards, tom lane