public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Peter Eisentraut <[email protected]>
Cc: Greg Sabino Mullane <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: [PATCH] Provide support for trailing commas
Date: Wed, 21 Jan 2026 12:21:55 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CAKAnmmKVwP=yr8t8p8_QtrBFjyENLZyPxscJh4UrkCeqMQuhrw@mail.gmail.com>
	<[email protected]>

Peter Eisentraut <[email protected]> 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






view thread (17+ messages)  latest in thread

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: [PATCH] Provide support for trailing commas
  In-Reply-To: <[email protected]>

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

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