Re: [PATCH] Provide support for trailing commas

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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-07 04:58:32
Message-ID: CAFj8pRDN7dtu3LdMtgmsayJkOKyOOT57oh=JQ-J_rH69V5e6TQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

út 6. 1. 2026 v 21:49 odesílatel Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> napsal:

> Greg Sabino Mullane <htamfids(at)gmail(dot)com> 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 with
> > 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.
>

+1

Pavel

>
> regards, tom lane
>
> [1]
> https://www.postgresql.org/message-id/flat/20140928114246.GA22150%40artax.karlin.mff.cuni.cz
> [2]
> https://www.postgresql.org/message-id/flat/0368c60f-abe2-4f5f-972d-7cd1e6db2382%40gmail.com
>
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Japin Li 2026-01-07 05:12:57 Re: Pasword expiration warning
Previous Message Michael Paquier 2026-01-07 04:43:26 Re: Support for 8-byte TOAST values (aka the TOAST infinite loop problem)