Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kzwM0-0007gQ-86 for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Jan 2021 06:43:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kzwLz-0005bM-6i for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Jan 2021 06:43:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kzwLz-0005bF-06 for pgsql-hackers@lists.postgresql.org; Thu, 14 Jan 2021 06:43:31 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kzwLx-0003VQ-2C for pgsql-hackers@postgresql.org; Thu, 14 Jan 2021 06:43:30 +0000 Received: from hnk.local (p2695249-ipbf2908funabasi.chiba.ocn.ne.jp [60.33.94.249]) by oss.nttdata.com (Postfix) with ESMTPSA id 98B9462824; Thu, 14 Jan 2021 15:43:25 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.3 at oss.nttdata.com Subject: Re: [PATCH] Feature improvement for CLOSE, FETCH, MOVE tab completion To: Masahiko Sawada , Fujii Masao Cc: Peter Eisentraut , Shinya11.Kato@nttdata.com, PostgreSQL-development References: <7559e8ee8a0644c8aad79837092143c7@MP-MSGSS-MBX001.msg.nttdata.co.jp> <28d43417-af7f-c3b8-da19-189a50d2d85c@enterprisedb.com> From: Fujii Masao Message-ID: Date: Thu, 14 Jan 2021 15:43:25 +0900 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2021/01/14 14:38, Masahiko Sawada wrote: > On Wed, Jan 13, 2021 at 1:55 PM Fujii Masao wrote: >> >> On Tue, Jan 12, 2021 at 11:09 AM Fujii Masao wrote: >>> >>> On Tue, Jan 12, 2021 at 10:00 AM Masahiko Sawada wrote: >>>> >>>> On Mon, Jan 11, 2021 at 11:00 PM Peter Eisentraut >>>> 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