| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
| Cc: | Greg Sabino Mullane <htamfids(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: [PATCH] Provide support for trailing commas |
| Date: | 2026-01-21 17:21:55 |
| Message-ID: | 2228785.1769016115@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Peter Eisentraut <peter(at)eisentraut(dot)org> 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Todd Liebenschutz-Jones | 2026-01-21 17:25:39 | [PATCH v1] Document pg_get_partition_constraintdef. |
| Previous Message | Mark Dilger | 2026-01-21 16:59:51 | Re: Inval reliability, especially for inplace updates |