Re: DECLARE syntax is different from the 2016 SQL standard

From: Elliot Chance <elliotchance(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-docs(at)postgresql(dot)org
Subject: Re: DECLARE syntax is different from the 2016 SQL standard
Date: 2017-03-14 06:07:11
Message-ID: CANMDVGbEpmXXtUz60SFRYnBiBYmS_H656c6ry0xMS5WT4=-SaQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)sss(dot)pgh(dot)pa(dot)us) wrote:

elliotchance(at)gmail(dot)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 &quot;CURSOR&quot; keyword
before the
> &quot;FOR&quot; 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

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2017-03-14 13:36:14 Re: DECLARE syntax is different from the 2016 SQL standard
Previous Message Pavel Stehule 2017-03-14 05:21:38 Re: incorrect assignment op (= vs :=)