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