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 1vdLdb-00H4Vf-35 for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Jan 2026 04:59:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vdLdY-00Bppb-33 for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Jan 2026 04:59:13 +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 1vdLdY-00BppS-1q for pgsql-hackers@lists.postgresql.org; Wed, 07 Jan 2026 04:59:13 +0000 Received: from mail-yx1-xb131.google.com ([2607:f8b0:4864:20::b131]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vdLdX-004erq-2Y for pgsql-hackers@lists.postgresql.org; Wed, 07 Jan 2026 04:59:12 +0000 Received: by mail-yx1-xb131.google.com with SMTP id 956f58d0204a3-6455a60c11fso1351978d50.2 for ; Tue, 06 Jan 2026 20:59:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767761950; x=1768366750; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=R1K//oqJz9pBgwEq7oel8oYSHBGXbIv9lymQrp1eNAc=; b=hIyuTOGENkcfNUcokYCgJcNV4HlmN2zMyW9fTCluC/pd7dhvaWsAl62suLDlQ7Uniy epJH+diwIJs+E7eRGfcOiK1F7Y4Ihio9/RBGVVqUB6Ge1pyueowiqwzteq6Xyy9x5Inf S+y9rNvL0aE44ZAAp1P4bGY78ehHQO9snpVJ/zvGf69I7mlt8e3/Y1A2Mxk6FGUrsmZ3 Neh1a06oMMBns0UrW9OITpWQMee+Fm2n9to8R5zXh3fzp6jnVSZCCVo57TDgHS/uy4Ii +JiZCvDv7lAIeZEps1F2k7Dhk0kAzZynu1c9Efp0rFqBj0EWUpESvQ3bZKB1rFwQ6p0o CL8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767761950; x=1768366750; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=R1K//oqJz9pBgwEq7oel8oYSHBGXbIv9lymQrp1eNAc=; b=uuhRON6zvLAioiBae1TFHYk7HhbIGQGF9+6YOqH4q9ZojJMN0WI9Me/d8MMR3psNJb A7TOtNbvgK7n0G67JizaEiygT2apSy/QS8+tWVt9U/xH/dud2DHo7FF5DbesU66OanuA DSR/f8NPoQ5YdojG9DmUsO8i1f5q4orFqTYlDX102kpt7k+6l2Wv3311ky5IdlzrnCOS e+uzSKI4098RQfJciu9RKN/wD2jHzzK0AKN1+HHicpRCh0bIY9upWx2VOySuxG83cRcz kBFgXh13llouCR3W03D/bGdxBfd0eD094trm2mGfnAWf2ocgno71pMjEX/uzlvyB0TQy 6deA== X-Forwarded-Encrypted: i=1; AJvYcCWSVUiPHsznqxOqUVsJXR49pp30oVyZAnyJVR6cnmbla72IXSLWu0HDDaGEJbnpFsd4rG39YzTPg1zKK+Jh@lists.postgresql.org X-Gm-Message-State: AOJu0YxzfFY9LRZoVfj5qiZ9rNI7Zsa2rF1T9bRhG1RF1fhohJR4hPtU ZWKGhtovC2KZ63z3Fm/k06Ld5rmKo2ZS4V2eMu5+YEwh7PYBGg5CV0A9i0SatoL9VE96si4e+sC /+UQBO/R48RZNLCMFjCu0vyrUVuOiTvg= X-Gm-Gg: AY/fxX58QY1TNZ6+Qn5e5aXxQs1zxmWI5/cK7Zw3pwTztLn3PuW1rFmHBRDXpYVxWx/ Mz9BXRkU6d3M6L+gfJkhTtJAmAbfftbFa2hIAn7ARan7UwCnOIiGt7IUSFpeCg+qqErbczGUlrB IuGYXGmsdrwHn7f+PIpql78KX2LypFcdBPuNogk4VaT4HD0t0Akb8KyPnZgXhuDAfNo2lKl2gy5 k6mEWzvKl+m0wTEmKR/Fs7J4R9jDngK6s3jDv3SI0jTg/NgohUnTyfy/KvwgTGtMGLJcVlgSj6d 9TB6ZSkv2sXKZ9pms4ygFVeCDLCdvVChH/Qts0W7TF95ygUCG5bEn2tewHEDCCCN0uzTLKWEbIw PzXCWSeFO0l7Ur1XFbximIW9vPHFJ8ptEp5BZHjvHWcoGY0yzeEjnvGu0 X-Google-Smtp-Source: AGHT+IEHe7AdVuB6o9W2+Q813C6pqFEF+4Jxf7AfYMhvP7EUPVu/IUIPFXWOuHNntnv6tSyS2ubd+H5kerV45yvvw2E= X-Received: by 2002:a05:690e:210:b0:644:60d9:7534 with SMTP id 956f58d0204a3-64716cc07cemr850774d50.90.1767761949910; Tue, 06 Jan 2026 20:59:09 -0800 (PST) MIME-Version: 1.0 References: <1619826.1767732539@sss.pgh.pa.us> In-Reply-To: <1619826.1767732539@sss.pgh.pa.us> From: Pavel Stehule Date: Wed, 7 Jan 2026 05:58:32 +0100 X-Gm-Features: AQt7F2o_sIqoa4IONtAh1jGonROx692n0IKOoa2YTLe65yslcU6TVoBsrTmCN4Y Message-ID: Subject: Re: [PATCH] Provide support for trailing commas To: Tom Lane Cc: Greg Sabino Mullane , "pgsql-hackers@lists.postgresql.org" Content-Type: multipart/alternative; boundary="00000000000012689b0647c527f9" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000012689b0647c527f9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =C3=BAt 6. 1. 2026 v 21:49 odes=C3=ADlatel Tom Lane nap= sal: > 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 doe= s > > 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 wi= th > > 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-7cd1e6= db2382%40gmail.com > > > --00000000000012689b0647c527f9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=C3=BAt 6. 1. 2= 026 v=C2=A021:49 odes=C3=ADlatel Tom Lane <tgl@sss.pgh.pa.us> napsal:
Greg Sabino Mullane <htamfids@gmail.com> writes:
> Happy New Year! Please find attached a patch to provide comprehensive<= br> > trailing comma support, where we allow (when possible) a comma that do= es
> 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 w= ith
> our parser (or parsers in general) may suspect.

Indeed.=C2=A0 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.=C2=A0 And frankly, I don't=
agree that it'd be beneficial.

+1

Pavel
=C2=A0

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 regards, tom lane

[1] http= s://www.postgresql.org/message-id/flat/20140928114246.GA22150%40artax.karli= n.mff.cuni.cz
[2] https= ://www.postgresql.org/message-id/flat/0368c60f-abe2-4f5f-972d-7cd1e6db2382%= 40gmail.com


--00000000000012689b0647c527f9--