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 1vdbTr-002fKf-0O for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Jan 2026 21:54:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vdbTo-00Fdn8-2k for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Jan 2026 21:54: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 1vdbTo-00Fdn0-1k for pgsql-hackers@lists.postgresql.org; Wed, 07 Jan 2026 21:54:13 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vdbTm-004mMq-1P for pgsql-hackers@lists.postgresql.org; Wed, 07 Jan 2026 21:54:10 +0000 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-42fbc544b09so1794870f8f.1 for ; Wed, 07 Jan 2026 13:54:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767822849; x=1768427649; 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=j+NQ2DbToYKiLGB94h3R8Gc4mGTpIFvUG4KJB10iVkM=; b=h8T7E0Dzf9OOYX3iYPlgS+3Dy1et5J6NR8SDaN/RRoHamUE2W7xo0aVCaTw+22c79e k81Wbl+6ETmV8kBORlsnAg7Pba6hUeL/FLEJ+rfwIYi0GbTiCBle8xtnTP0KXWiENzwK x7L/4inomKZbZw3wQJdhheC84rkwtReFWghpeQlxgeVgj0R/9dZzDI8pQxbjfb2JC0fC +eLbT1OIdWM+IcLROB2hozz7oNg5RgDfhFXmIparl0q63cGs/GcEn/GOx0RYeaKDYFXC ilncF5oTXHpZlcUeZ4nqEr9vMT/ntjbEME/sNDKZzV7/GvLzv3dNt+yuJZ15mM0BW5CT MvSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767822849; x=1768427649; 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=j+NQ2DbToYKiLGB94h3R8Gc4mGTpIFvUG4KJB10iVkM=; b=gdIb/SO0Z75jYidNt21S5lESa5GfJi4vn1WwRDnPoNzqo0NcAIeWHBH0t/zRc7bqhH pOtaPE2X4a6gifsybhhOcIB95VBNvp2iuGqTV+z9qmsTcIZ9hYF3sfU1KPb7vlRJunwz 08jNGDfmefPbYzcehb/gR3bPmRoMRyMqJ1CLu7YS7IciZvnOP6PNyJowL40l2/9tlhc2 786Rs6Z1xqapsf3WHiecPLCXr8Xd7LdrZRHUWZnv+e3OBhoDESzGIAfgebWEkvvzcgLW s5SnDYymlBgSUIWwmV/2duLlI71RGUj70nzj4lWLIhe+/jpHxqNCmvNHjTKmtrAXr53S AsMg== X-Forwarded-Encrypted: i=1; AJvYcCXVeL3jEstILUjeBa82itE9ctJ9HwFhKoTxwhqEOJpBsHFWr3sWgE2OibzThIt/HeUenGj2vtCknHbD9yPx@lists.postgresql.org X-Gm-Message-State: AOJu0YynpML+me1t+LV0Mgr/uvHpGgLJNDuA+9NwFwIB663iY3U8H9t6 IuDtCyXb1KSqDNwqHjqGpy0DvYSKos12Q6SjCM9/ybLdVCHOz5R/0jdzLlAnETA7eedyfg06qov 7/nbuYr+kOJW5X6o/Cq65JJltu5cNSjc= X-Gm-Gg: AY/fxX4VgbHRpbQmW3bIlMOZM9eo046Woism7j3FGA6tcdDzeFeUx7cENO6FLnlrZi4 clgnzPNKcb5vRpTTMU3ODORXkyWJ3DyerKEEUrLJJF4pGzb0FwaEjqe3WDZCVZqvoC+Q0klymkj khXxMuaUK2r4e6JEHFigMycIW7fkKDBSnsTr/SKTdZq1RqA1EbeJysIYfn+AoeHRLp4H92FWK6W EeSMtPRcfLwBgCUerhLR+BzodLRlMpja/b1pM/zq1dxTFOyY9X07Wms2sT4t/0fH/UpxtTb35w8 vmkLpgRYfzu2B/ZTemv16U9YVMyvNReoDHPpaT5dVn/aElG2FXNZVTTt6kkfOw== X-Google-Smtp-Source: AGHT+IGX0O3RROfTIBgY6bjmPsef5922AwP4ex5xgHmf8aISr+UkErSzeC6r4U+BFkBMKQCrr5UX2ryIyod9oajZqV4= X-Received: by 2002:a05:6000:2305:b0:431:a33:d864 with SMTP id ffacd0b85a97d-432c3790a14mr5253201f8f.18.1767822848588; Wed, 07 Jan 2026 13:54:08 -0800 (PST) MIME-Version: 1.0 References: <1619826.1767732539@sss.pgh.pa.us> In-Reply-To: From: David Rowley Date: Thu, 8 Jan 2026 10:53:55 +1300 X-Gm-Features: AQt7F2rH0LGIB3Yns-8LaHvBpvq7xjN26QNJWU5HG9d22U8NSuaC79UvrGyJ9ZM Message-ID: Subject: Re: [PATCH] Provide support for trailing commas To: Greg Sabino Mullane Cc: Tom Lane , "pgsql-hackers@lists.postgresql.org" Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 8 Jan 2026 at 03:07, Greg Sabino Mullane wrote: > No, it's not yet in the SQL standard, but why not be more liberal in what we accept, I believe the concern is that it could hinder us from being able to implement new SQL standard features. Back in 8.4, "AS" became optional in the SELECT list. I recall that it was a bit tricky to get around some grammar ambiguities with that. There's some detail on that in the comment added in e67867b26. > and not have people invent various workaround hacks (e.g. dummy columns)? Because the parser eats the comma, there are no behavioral changes post-parsing. Why do people have to add dummy columns? Is this because these people don't know how to program a check to see if they're on the first iteration of a loop or not? > Unsurprisingly, I also don't agree that new SQL committee changes will be that hard to support around some trailing comma support. To me, that seems like a risky thing to disagree with. I expect you don't have a vision of what the standard committee might dream up infinitely far into the future. Personally, I don't want this feature. I'd rather receive an error message when I make silly mistakes in code that I write. If I have code to dynamically build an SQL statement and I have a bug that causes a variable that stores a column name to sometimes be an empty string, with your patch, I'll get an error message in all cases unless the column's position is last. I want the error at all times, not sometimes. David