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 1mZK7E-0001Gf-Vv for pgsql-docs@arkaria.postgresql.org; Sat, 09 Oct 2021 21:42:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mZK7D-0000iS-Hq for pgsql-docs@arkaria.postgresql.org; Sat, 09 Oct 2021 21:42:47 +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 1mZK7D-0000iK-Bq for pgsql-docs@lists.postgresql.org; Sat, 09 Oct 2021 21:42:47 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mZK76-00065w-2w for pgsql-docs@lists.postgresql.org; Sat, 09 Oct 2021 21:42:47 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 199LgYvn251901; Sat, 9 Oct 2021 17:42:34 -0400 From: Tom Lane To: rir cc: Laurenz Albe , pgsql-docs@lists.postgresql.org Subject: Re: small patch In-reply-to: <20211009213107.z3ffgqorqmbwqabp@localhost> References: <20211001163938.ifg4ayrsjwd7r6zr@localhost> <1c0eefa304434f67fd6a5a9d3f420d59ac74623a.camel@cybertec.at> <20211007033905.pmsg5qnyqceepfva@localhost> <9f703511c57d6bb0f44f9a968414869854ae50ea.camel@cybertec.at> <20211007200612.rkxxgeorw6w4fpjp@localhost> <175281.1633638256@sss.pgh.pa.us> <20211009213107.z3ffgqorqmbwqabp@localhost> Comments: In-reply-to rir message dated "Sat, 09 Oct 2021 17:31:07 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <251899.1633815754.1@sss.pgh.pa.us> Date: Sat, 09 Oct 2021 17:42:34 -0400 Message-ID: <251900.1633815754@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk rir writes: > On Thu, Oct 07, 2021 at 04:24:16PM -0400, Tom Lane wrote: >> BTW, as it stands, the diagram is ambiguous >> because there are two ways to parse >> FETCH cursor_name >> ... is present but empty, or omitted altogether? > I am confident you know what you mean, but I don't. At the _parsing_ > stage how is any distinction between emptiness and omission? Bison certainly makes a distinction, because it would have two different production paths it could follow if the actual grammar looked like this (which it doesn't). It doesn't care whether the emitted parse tree would be the same. Indeed, it would be possible for the two cases to create different parse trees. regards, tom lane