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 1msRpK-0002Jw-Mo for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Dec 2021 15:47:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1msRpJ-00076s-GO for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Dec 2021 15:47:21 +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 1msRpJ-000749-6K for pgsql-hackers@lists.postgresql.org; Wed, 01 Dec 2021 15:47:21 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1msRpF-0008Tx-3M for pgsql-hackers@postgresql.org; Wed, 01 Dec 2021 15:47:20 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 0D9E83201C81; Wed, 1 Dec 2021 10:47:12 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 01 Dec 2021 10:47:13 -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=66siO+8cn5TeqRGvQ9XMV+zlwPEF88XBZ9cqlXr+F Bo=; b=MIX60D1MficWTkzQO/xkWs/igcLXPK0jDeiCLaZx1iaGAI+G94j3THEYW eeNCxGMQOEWFne20KQW+wxEv+3f3riwlt/H4/Uk0Ig8Cdy3X3KTtIDeKptFOuWRd iWgmkAM+knORO768BqwJeRDEq4Va3BEDBr9PB0XdlsPQcCXxhCritK6e4HzhmCj/ dJes6onmXCivWhaE5m4+9Yp7ctA4lkqAqFttBvxhHvFxhiGNqZ8cB7bkhSnOiPG3 HRqiddE/iDSksg+AAPJwmb8D6+DQuAz5SUALTFMqcD6/S+a9scJhbXbiHU8wUPmW /3ST5s72QqLWeNc5Qu4sfbURT7vcQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrieefgdejlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfhfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpefrvghtvghr ucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnthgvrh hprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeektdefgfegudfhuefgheeh kedtvdeugfejfeffledvveelvdduffehffdukeetgeenucffohhmrghinhepphhgtgdrlh gsnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphgv thgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 1 Dec 2021 10:47:10 -0500 (EST) Message-ID: <0f37d2ec-6689-4d23-7ba5-4d2a73c2666f@enterprisedb.com> Date: Wed, 1 Dec 2021 16:47:09 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: Non-decimal integer literals Content-Language: en-US To: John Naylor Cc: pgsql-hackers References: <3260805.1631106874@sss.pgh.pa.us> <8f2cdc30-350a-9782-8d95-6865a4ccb857@postgresfriends.org> <31bba70a-f5a8-9276-37a6-fa6f2c4eee6c@enterprisedb.com> <0d895aa8-d1de-3637-9ad4-de0269918e77@enterprisedb.com> From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 25.11.21 18:51, John Naylor wrote: > If we're going to change the comment anyway, "the parser" sounds more > natural. Aside from that, 0001 and 0002 can probably be pushed now, if > you like. done > --- a/src/interfaces/ecpg/preproc/pgc.l > +++ b/src/interfaces/ecpg/preproc/pgc.l > @@ -365,6 +365,10 @@ real ({integer}|{decimal})[Ee][-+]?{digit}+ >  realfail1 ({integer}|{decimal})[Ee] >  realfail2 ({integer}|{decimal})[Ee][-+] > > +integer_junk {integer}{ident_start} > +decimal_junk {decimal}{ident_start} > +real_junk {real}{ident_start} > > A comment might be good here to explain these are only in ECPG for > consistency with the other scanners. Not really important, though. Yeah, it's a bit weird that not all the symbols are used in ecpg. I'll look into explaining this better. > 0006 > > +{hexfail} { > + yyerror("invalid hexadecimal integer"); > + } > +{octfail} { > + yyerror("invalid octal integer"); >   } > -{decimal} { > +{binfail} { > + yyerror("invalid binary integer"); > + } > > It seems these could use SET_YYLLOC(), since the error cursor doesn't > match other failure states: ok > We might consider some tests for ECPG since lack of coverage has been a > problem. right > Also, I'm curious: how does the spec work as far as deciding the year of > release, or feature-freezing of new items? The schedule has recently been extended again, so the current plan is for SQL:202x with x=3, with feature freeze in mid-2022. So the feature patches in this thread are in my mind now targeting PG15+1. But the preparation work (up to v5-0005, and some other number parsing refactoring that I'm seeing) could be considered for PG15. I'll move this to the next CF and come back with an updated patch set in a little while.