Re: [PATCH] Feature improvement for CLOSE, FETCH, MOVE tab completion

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Shinya11(dot)Kato(at)nttdata(dot)com, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Feature improvement for CLOSE, FETCH, MOVE tab completion
Date: 2021-01-14 06:43:25
Message-ID: a5546203-6567-5cab-c8ea-6c97b3f137cb@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2021/01/14 14:38, Masahiko Sawada wrote:
> On Wed, Jan 13, 2021 at 1:55 PM Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>>
>> On Tue, Jan 12, 2021 at 11:09 AM Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>>>
>>> On Tue, Jan 12, 2021 at 10:00 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>>>>
>>>> On Mon, Jan 11, 2021 at 11:00 PM Peter Eisentraut
>>>> <peter(dot)eisentraut(at)enterprisedb(dot)com> wrote:
>>>>>
>>>>> 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.
>>>>
>>>> Thanks for your comment. Agreed.
>>>>
>>>> So regarding the tab completion for DECLARE statement, perhaps it
>>>> would be better to follow the documentation?
>>>
>>> IMO yes because it's less confusing to make the document and
>>> tab-completion consistent.
>
> Agreed.
>
>>
>> I updated the patch that way. Could you review this version?
>
> Thank you for updating the patch. Looks good to me.

Pushed. Thanks!

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Li Japin 2021-01-14 06:46:35 Re: Fix typo about WalSndPrepareWrite
Previous Message Amit Kapila 2021-01-14 06:40:47 Re: Single transaction in the tablesync worker?