Re: Trailing comma support in SELECT statements - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Trailing comma support in SELECT statements
Date
Msg-id 14881.1413900998@sss.pgh.pa.us
Whole thread Raw
In response to Re: Trailing comma support in SELECT statements  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Responses Re: Trailing comma support in SELECT statements
List pgsql-hackers
Jim Nasby <Jim.Nasby@BlueTreble.com> writes:
> On 10/20/14, 11:16 AM, Andrew Dunstan wrote:
>> The JSON spec is quite clear on this. Leading and trailing commas are not allowed. I would fight tooth and nail not
toallow it for json (and by implication jsonb, since they use literally the same parser - in fact we do that precisely
sotheir input grammars can't diverge).
 

> +1. Data types that implement specs should follow the spec.

> I was more concerned about things like polygon, but the real point (ha!) is that we need to think about the data
typestoo. (I will say I don't think things that mandate an exact number of elements (like point, box, etc) should
supportextra delimiters).
 

I'm pretty strongly against this, as it would create cross-version hazards
for data.  Having queries that depend on newer-version SQL features is
something that people are used to coping with ... but data that loads into
some versions and not others seems like a hassle we do not need to invent.

(Of course, I'm not for the feature w.r.t. SQL either.  But breaking data
compatibility is just adding an entire new dimension of trouble.)
        regards, tom lane



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Inconsistencies in documentation of row-level locking
Next
From: Amit Kapila
Date:
Subject: Re: Wait free LW_SHARED acquisition - v0.2