Re: Allowing additional commas between columns, and at the end of the SELECT clause - Mailing list pgsql-hackers

From Dagfinn Ilmari Mannsåker
Subject Re: Allowing additional commas between columns, and at the end of the SELECT clause
Date
Msg-id 87bk59hp5o.fsf@wibble.ilmari.org
Whole thread Raw
In response to Allowing additional commas between columns, and at the end of the SELECT clause  (Artur Formella <artur.formella3@gmail.com>)
Responses Re: Allowing additional commas between columns, and at the end of the SELECT clause
List pgsql-hackers
Matthias van de Meent <boekewurm+postgres@gmail.com> writes:

> On Mon, 13 May 2024 at 10:42, Artur Formella <artur.formella3@gmail.com> wrote:
>> Motivation:
>> Commas of this type are allowed in many programming languages, in some
>> it is even recommended to use them at the ends of lists or objects.
>
> Single trailing commas are a feature that's more and more common in
> languages, yes, but arbitrary excess commas is new to me. Could you
> provide some examples of popular languages which have that, as I can't
> think of any.

The only one I can think of is Perl, which I'm not sure counts as
popular any more.  JavaScript allows consecutive commas in array
literals, but they're not no-ops, they create empty array slots:

    ❯ js
    Welcome to Node.js v18.19.0.
    Type ".help" for more information.
    > [1,,2,,]
    [ 1, <1 empty item>, 2, <1 empty item> ]

- ilmari



pgsql-hackers by date:

Previous
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: Slow catchup of 2PC (twophase) transactions on replica in LR
Next
From: Matthias van de Meent
Date:
Subject: WAL_LOG CREATE DATABASE strategy broken for non-standard page layouts