From: | David Johnston <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Alex Goncharov <alex(dot)goncharov(dot)usa(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, "David E(dot) Wheeler" <david(at)justatheory(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Trailing comma support in SELECT statements |
Date: | 2014-10-28 23:59:58 |
Message-ID: | CAKFQuwbxM=pMxfZYHk9h8Q6WUUE1SAq+7PznNoY5KvU=k=3Skw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Oct 24, 2014 at 6:36 AM, Alex Goncharov <
alex(dot)goncharov(dot)usa(at)gmail(dot)com> wrote:
> On Tue, Oct 21, 2014 at 10:16 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
>> (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.
>>
>
> Another dimension of the trouble is breaking the operation of the
> tools that parse SQL statements for various purposes, e.g. for
> dependency analysis.
>
If you hit the tool before you hit PostgreSQL then obviously you need to
conform to whatever it accepts.
For SQL directly generated from system catalogs we should not add extra
commas. Function text is obviously one area where we keep queries as-is so
how does this play with existing pl/pgsql static analysis routines?
I'd be much more inclined to favor this if the user is provided a
capability to have warnings emitted whenever extraneous commas are present
- either via some form of strict mode or linting configuration.
I do like the idea of being able to write "column," instead of ", column"
with fewer "ooops" moments and marginal diff differences.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2014-10-29 00:15:11 | how to handle missing "prove" |
Previous Message | Tom Lane | 2014-10-28 23:30:38 | Re: Trailing comma support in SELECT statements |