pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feedDECLARE syntax is different from the 2016 SQL standard
4+ messages / 3 participants
[nested] [flat]
* DECLARE syntax is different from the 2016 SQL standard
@ 2017-03-12 06:09 elliotchance@gmail.com
0 siblings, 1 reply; 4+ messages in thread
From: elliotchance@gmail.com @ 2017-03-12 06:09 UTC (permalink / raw)
To: 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
--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: DECLARE syntax is different from the 2016 SQL standard
@ 2017-03-14 02:28 Tom Lane <tgl@sss.pgh.pa.us>
parent: elliotchance@gmail.com
0 siblings, 1 reply; 4+ messages in thread
From: Tom Lane @ 2017-03-14 02:28 UTC (permalink / raw)
To: elliotchance@gmail.com; +Cc: pgsql-docs
elliotchance@gmail.com writes:
> 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.
For some reason, the spec puts the CURSOR keyword into <cursor
properties>, but it's definitely there:
<cursor properties> ::=
[ <cursor sensitivity> ] [ <cursor scrollability> ] CURSOR
[ <cursor holdability> ]
[ <cursor returnability> ]
regards, tom lane
--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: DECLARE syntax is different from the 2016 SQL standard
@ 2017-03-14 06:07 Elliot Chance <elliotchance@gmail.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 4+ messages in thread
From: Elliot Chance @ 2017-03-14 06:07 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-docs
Sorry, this was my mistake. If i just spent 60 more seconds reading the
rules properly I would have seen this.
Although... it has bought up another possible bug with docs. The "Report an
error" box (which I used to send the original message) seems to not be
escaping HTML correctly... as seen in the previous message.
--
Elliot Chance
https://elliot.land
On 14 March 2017 at 1:28:37 PM, Tom Lane (tgl@sss.pgh.pa.us) wrote:
elliotchance@gmail.com writes:
> 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.
For some reason, the spec puts the CURSOR keyword into <cursor
properties>, but it's definitely there:
<cursor properties> ::=
[ <cursor sensitivity> ] [ <cursor scrollability> ] CURSOR
[ <cursor holdability> ]
[ <cursor returnability> ]
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: DECLARE syntax is different from the 2016 SQL standard
@ 2017-03-14 13:36 Tom Lane <tgl@sss.pgh.pa.us>
parent: Elliot Chance <elliotchance@gmail.com>
0 siblings, 0 replies; 4+ messages in thread
From: Tom Lane @ 2017-03-14 13:36 UTC (permalink / raw)
To: Elliot Chance <elliotchance@gmail.com>; +Cc: pgsql-docs
Elliot Chance <elliotchance@gmail.com> writes:
> Although... it has bought up another possible bug with docs. The "Report an
> error" box (which I used to send the original message) seems to not be
> escaping HTML correctly... as seen in the previous message.
Yeah, our web team is aware of that ...
regards, tom lane
--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2017-03-14 13:36 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-03-12 06:09 DECLARE syntax is different from the 2016 SQL standard elliotchance@gmail.com
2017-03-14 02:28 ` Tom Lane <tgl@sss.pgh.pa.us>
2017-03-14 06:07 ` Elliot Chance <elliotchance@gmail.com>
2017-03-14 13:36 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox