[DOCS] DECLARE syntax is different from the 2016 SQL standard - Mailing list pgsql-docs

From elliotchance@gmail.com
Subject [DOCS] DECLARE syntax is different from the 2016 SQL standard
Date
Msg-id 20170312060937.1416.26045@wrigleys.postgresql.org
Whole thread Raw
Responses Re: [DOCS] DECLARE syntax is different from the 2016 SQL standard  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-docs
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.1/static/sql-declare.html
Description:

Hi,

The 2016 standard uses a different syntax to declare a cursor:

<declare cursor> ::=
  DECLARE <cursor name> <cursor properties>
      FOR <cursor specification>

Notice that it does not require or permit the "CURSOR" keyword before the
"FOR" keyword.

I don't know why this was changed and unfortunately fixing this would break
existing implementations, but there should be a note about this under the
SQL Standard section.

This was discovered with: https://github.com/elliotchance/sqltest

BNF for 2016 can be found in the same project:
https://github.com/elliotchance/sqltest/blob/master/standards/2016/bnf.txt#L2371-L2372

pgsql-docs by date:

Previous
From: mnikulyak@gmail.com
Date:
Subject: [DOCS] Excluding common values from the index
Next
From: Tom Lane
Date:
Subject: Re: [DOCS] DECLARE syntax is different from the 2016 SQL standard