Re: PostgreSQL vs SQL Standard

From: David Fetter <david(at)fetter(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: PostgreSQL vs SQL Standard
Date: 2018-06-10 19:46:02
Message-ID: 20180610194602.GA5329@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jun 10, 2018 at 11:32:56AM -0400, Tom Lane wrote:
> Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> writes:
> > I beat at the grammar a bit to see what it would take to fix it at least
> > to the extent of allowing a_expr ColId in a select list after removing
> > postfix ops. It looked like it was doable by making these keywords more
> > reserved (all of which are already reserved words per spec):
> > DOUBLE, DAY, FILTER, HOUR, MINUTE, MONTH, OVER, PRECISION, SECOND,
> > VARYING, WITHIN, WITHOUT, YEAR
>
> Yeah, a side effect of allowing "a_expr ColId" is that we can expect,
> going forward, that a lot of new keywords are going to have to become
> fully reserved that otherwise wouldn't have to be. This is particularly
> a problem because of the SQL committee's COBOL-hangover tendency to
> invent new syntax that involves sequences of keywords; we usually
> don't have a good way to deal with that short of making the first
> keyword(s) reserved.
>
> It's arguable that going down that path will, in the long run, lead to
> breaking more applications (via their table/column names suddenly becoming
> reserved in some new version) than we rescue from having to quote their
> SELECT aliases. At the very least we need to recognize that this is far
> from cost-free.
>
> (wanders away wondering exactly what parsing technology the SQL committee
> thinks implementations use...)

If you're wondering why people think specifications that don't include
a reference implementation are a bad idea...

Best,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message crbenesch 2018-06-10 19:53:02 Re: queriing the version of libpq
Previous Message Dmitry Dolgov 2018-06-10 19:06:59 Re: assert in nested SQL procedure call in current HEAD