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 1kyxkZ-0007oI-TJ for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Jan 2021 14:00:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kyxkY-0002xI-Ja for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Jan 2021 14:00:50 +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 1kyxkX-0002xB-Se for pgsql-hackers@lists.postgresql.org; Mon, 11 Jan 2021 14:00:50 +0000 Received: from wforward2-smtp.messagingengine.com ([64.147.123.31]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kyxkS-0000mO-Ng for pgsql-hackers@postgresql.org; Mon, 11 Jan 2021 14:00:49 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailforward.west.internal (Postfix) with ESMTP id D7C9A264E; Mon, 11 Jan 2021 09:00:39 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 11 Jan 2021 09:00:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=DBmZYRsNQz0qJHOV7wLmc+dco03QqCc7Sah8bvERK uQ=; b=KMq0IqokhAmSsTzAh/uECRxuj86ZjKS0Q/4jS/CWcb7V7ejCf/lvt9U0X Etf5hFkuT861PcZ5BTmfw43l3D6Vik8zWnPExy9NgtwjpukF4jzacHr9EBq3XUSu vTJ0wZZGIxz59YPSHFV3TJkXAvSxg1+xJKSBxjXjN9rYohziBg8uwqsTvIul4tS9 kBcFAGPE8plEQQBY89qq2ia9SLwPEXmzytOuiO4qMzzq0IAiXcb619DpLa7M+Mjf GZ+uRBQglHB+5MCPmy0DAdDjWl/DTjGHxJSoaUnXm4Y5bWwS2IvB33I35RRCQOKs 4WwUn+Afdmm+QHi95kwDAIwcLmWaA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdehuddgiedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhohfkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnth gvrhhprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeehheeijefgvefhvdeh leekueevhfehhedvheetgffhteefgeeggfevjeejfffgvdenucfkphepkeejrddujeejrd ejvddrudegvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpehpvghtvghrrdgvihhsvghnthhrrghuthesvghnthgvrhhprhhishgvuggsrdgtoh hm X-ME-Proxy: Received: from april.pezone.net (p57b1488e.dip0.t-ipconnect.de [87.177.72.142]) by mail.messagingengine.com (Postfix) with ESMTPA id 0BC7924005C; Mon, 11 Jan 2021 09:00:37 -0500 (EST) Subject: Re: [PATCH] Feature improvement for CLOSE, FETCH, MOVE tab completion To: Masahiko Sawada , Shinya11.Kato@nttdata.com References: <7559e8ee8a0644c8aad79837092143c7@MP-MSGSS-MBX001.msg.nttdata.co.jp> Cc: PostgreSQL-development From: Peter Eisentraut Organization: EnterpriseDB Message-ID: <28d43417-af7f-c3b8-da19-189a50d2d85c@enterprisedb.com> Date: Mon, 11 Jan 2021 15:00:36 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.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-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.