Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fKAnd-0007hO-Gz for pgsql-hackers@arkaria.postgresql.org; Sat, 19 May 2018 22:58:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fKAnb-0004Hp-To for pgsql-hackers@arkaria.postgresql.org; Sat, 19 May 2018 22:58:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fKAnb-0004Hf-Mn for pgsql-hackers@lists.postgresql.org; Sat, 19 May 2018 22:58:03 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fKAnV-0003zW-2h for pgsql-hackers@postgresql.org; Sat, 19 May 2018 22:58:03 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w4JMvt8f022982; Sat, 19 May 2018 18:57:55 -0400 From: Tom Lane To: Andrew Gierth cc: pgsql-hackers@postgresql.org Subject: Re: Fix for FETCH FIRST syntax problems In-reply-to: <877enz476l.fsf@news-spur.riddles.org.uk> References: <877enz476l.fsf@news-spur.riddles.org.uk> Comments: In-reply-to Andrew Gierth message dated "Sat, 19 May 2018 23:33:22 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <22980.1526770675.1@sss.pgh.pa.us> Date: Sat, 19 May 2018 18:57:55 -0400 Message-ID: <22981.1526770675@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andrew Gierth writes: > Attached is a draft patch for fixing that, which additionally fixes the > ugly wart that OFFSET ROW/ROWS and FETCH FIRST [] ROW/ROWS ONLY > had very different productions for ; both now accept c_expr there. LGTM, except please s/presense/presence/ in grammar comment. Also, why'd you back off "must write" to "should write" in the docs? This doesn't make the parens any more optional than before. > I think a case can be made that this should be backpatched; thoughts? Meh, -0.5. This is not really a bug, because it's operating as designed. You've found a reasonably painless way to improve the grammar, which is great, but it seems more like a feature addition than a bug fix. I'd be fine with sneaking this into v11, though. regards, tom lane