From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Masahiko Sawada <sawada.mshk@gmail.com>
To: Shinya11.Kato@nttdata.com
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [PATCH] Feature improvement for CLOSE, FETCH, MOVE tab completion
Date: Mon, 11 Jan 2021 15:00:36 +0100
Message-ID: <28d43417-af7f-c3b8-da19-189a50d2d85c@enterprisedb.com> (raw)
In-Reply-To: <CAD21AoCCQDXqPwJy08An23VOUSxtd+HLfHPYZ0n2eAXM8MKepg@mail.gmail.com>
References: <b0e4c5c53ef84c5395524f5056fc71f0@MP-MSGSS-MBX001.msg.nttdata.co.jp>
<CAD21AoBRw9FY6oNj8ubY7XEwJ9Bprfehu88_ePbCfH93JLxWsw@mail.gmail.com>
<7559e8ee8a0644c8aad79837092143c7@MP-MSGSS-MBX001.msg.nttdata.co.jp>
<CAD21AoCCQDXqPwJy08An23VOUSxtd+HLfHPYZ0n2eAXM8MKepg@mail.gmail.com>
On 2021-01-05 10:56, Masahiko Sawada wrote:
> BTW according to the documentation, the options of DECLARE statement
> (BINARY, INSENSITIVE, SCROLL, and NO SCROLL) are order-sensitive.
>
> DECLARE name [ BINARY ] [ INSENSITIVE ] [ [ NO ] SCROLL ]
> CURSOR [ { WITH | WITHOUT } HOLD ] FOR query
>
> But I realized that these options are actually order-insensitive. For
> instance, we can declare a cursor like:
>
> =# declare abc scroll binary cursor for select * from pg_class;
> DECLARE CURSOR
>
> The both parser code and documentation has been unchanged from 2003.
> Is it a documentation bug?
According to the SQL standard, the ordering of the cursor properties is
fixed. Even if the PostgreSQL parser offers more flexibility, I think
we should continue to encourage writing the clauses in the standard order.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: peter.eisentraut@enterprisedb.com, sawada.mshk@gmail.com, Shinya11.Kato@nttdata.com
Subject: Re: [PATCH] Feature improvement for CLOSE, FETCH, MOVE tab completion
In-Reply-To: <28d43417-af7f-c3b8-da19-189a50d2d85c@enterprisedb.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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