Re: DECLARE syntax is different from the 2016 SQL standard

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: elliotchance(at)gmail(dot)com
Cc: pgsql-docs(at)postgresql(dot)org
Subject: Re: DECLARE syntax is different from the 2016 SQL standard
Date: 2017-03-14 02:28:37
Message-ID: 28661.1489458517@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

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 Pavel Stehule 2017-03-14 05:21:38 Re: incorrect assignment op (= vs :=)
Previous Message elliotchance 2017-03-12 06:09:37 DECLARE syntax is different from the 2016 SQL standard