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 1mYZr2-0008Uv-0x for pgsql-docs@arkaria.postgresql.org; Thu, 07 Oct 2021 20:19:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mYZr0-0005lb-PI for pgsql-docs@arkaria.postgresql.org; Thu, 07 Oct 2021 20:18:58 +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 1mYZr0-0005lT-JC for pgsql-docs@lists.postgresql.org; Thu, 07 Oct 2021 20:18:58 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mYZqy-0006Mg-0f for pgsql-docs@lists.postgresql.org; Thu, 07 Oct 2021 20:18:58 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id B93B23200973; Thu, 7 Oct 2021 16:18:52 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 07 Oct 2021 16:18:52 -0400 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:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=r0CkJ4NaaITe02dVA4OMDiNqQjGCsvwhhItQfwE9JRA=; b=PVVFMkLs yx0P3nJax/qZAQu9hz5DAAfTyfwDelqQJge4enX2WzazqF7N7O06OADAteuGBdQ6 8xfC8yssGR397XBJjgOt2ou2SmMGm26cTPAot5Haz55jXMEOaMBujwsyMcQacJFF gqXqwBpAGMwSHrqNlbog1klu5LEhIo7RxOWKPYXWKmpZw60rTt29YAvu3IJd5ngn wAl+Wva54zmX52PXl/xDvogm+xMiC/snOxsHEPU0Hy1Qofct9YTuF3VEdE9hmnB+ GOToXVmVDiaH88Q+S7mYO3PF8BMdr44Fi9JJIjcwB4E+STNBerFZCXIUNFf6OO8A +heP4XFf2q2Jxg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudelkedgudegiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepudejveejffejveduudetvdekieeuiedtvdeileefkeev jedufeeguedvjefhueelnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 7 Oct 2021 16:18:51 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 661512A06D7; Thu, 7 Oct 2021 17:18:49 -0300 (-03) Date: Thu, 7 Oct 2021 17:18:49 -0300 From: Alvaro Herrera To: rir Cc: Laurenz Albe , pgsql-docs@lists.postgresql.org Subject: Re: small patch Message-ID: <202110072018.yugknob35ubc@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20211007200612.rkxxgeorw6w4fpjp@localhost> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Oct-07, rir wrote: > For myself, > 'FETCH [ [ FROM | IN ] ] ' > clearly indicates that 'direction' is optional. Hmm, aren't you misreading the scope of the outer square brackets? If is optional independently of [FROM|IN], then the synopsis should be FETCH [ ] [ FROM | IN ] and I think that's correct, since all forms omitting any of these are accepted: alvherre=# begin; BEGIN alvherre=*# declare c scroll cursor with hold for select 1 ; DECLARE CURSOR alvherre=*# commit; COMMIT alvherre=# fetch forward from c; ?column? ---------- 1 (1 fila) alvherre=# fetch from c; ?column? ---------- (0 filas) alvherre=# fetch BACKWARD c; ?column? ---------- 1 (1 fila) alvherre=# fetch c; ?column? ---------- (0 filas) -- Álvaro Herrera 39°49'30"S 73°17'W — https://www.EnterpriseDB.com/