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 1nCjwj-00047B-Vp for pgsql-hackers@arkaria.postgresql.org; Wed, 26 Jan 2022 15:10:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nCjwi-0007os-SE for pgsql-hackers@arkaria.postgresql.org; Wed, 26 Jan 2022 15:10:52 +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 1nCjwh-0007oj-Md for pgsql-hackers@lists.postgresql.org; Wed, 26 Jan 2022 15:10:52 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nCjwc-0002ib-5k for pgsql-hackers@postgresql.org; Wed, 26 Jan 2022 15:10:50 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 4C9E05C011B; Wed, 26 Jan 2022 10:10:43 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 26 Jan 2022 10:10:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=H7mO/IWJnbNFwVe0gmqEpmeuiFBPJ2NqVoT2B74Uy ng=; b=HQ+msLr8s0cIVJOmAGPE7tZ3iDCexP0vY8sBWWNAeGc5+5v8MwDyhekAr MC/MD8ikECJV8iD1ypIi4AEV+Jp1uj9hm1z+CyWXBBXe5W5s+KFNIUrIFqVyNUZ9 2x/FM2V3SE+7Uq3AbAGzALOOCOoi2o0DNQUoEHxPxXF48wsRPUrGrQbjT/pIUGhB jUzzDPLG5xyivRlakqjXI6YON70/MMF1iwcQroh7PsCCgTfHavRUxFCLn9Nz6xyD 2nKvLv2WunpHxbdaAarlBHYKQbqmqglOmpJcrKhi6eNUiRiDAp4IbI3DARtzbqdA Gim7e+X3W7MaMHXLEd4cCtKV1TjGw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrfedugdejvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvghtvghr ucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnthgvrh hprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeefjeegheetuefhveevudel ueeftdejteeiffetvdduhfdtieefgfeutedtveeggfenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvihhsvghnthhrrghuthes vghnthgvrhhprhhishgvuggsrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 26 Jan 2022 10:10:42 -0500 (EST) Message-ID: <97aa22d7-b80f-efa1-f368-3dbf73a15980@enterprisedb.com> Date: Wed, 26 Jan 2022 16:10:39 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: Non-decimal integer literals Content-Language: en-US To: Tom Lane , Robert Haas Cc: pgsql-hackers , John Naylor 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> <0f37d2ec-6689-4d23-7ba5-4d2a73c2666f@enterprisedb.com> <577603ec-787b-61b8-23a2-1bd0457ed1c7@enterprisedb.com> <2317133.1643155358@sss.pgh.pa.us> From: Peter Eisentraut In-Reply-To: <2317133.1643155358@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 26.01.22 01:02, Tom Lane wrote: > Robert Haas writes: >> On Tue, Jan 25, 2022 at 5:34 AM Peter Eisentraut >> wrote: >>> Which part exactly? There are several different changes proposed here. > >> I was just going based on the description of the feature in your >> original post. If someone is hoping that int4in() will accept only >> ^\d+$ then they will be disappointed by this patch. > > Maybe I misunderstood, but I thought this was about what you could > write as a SQL literal, not about the I/O behavior of the integer > types. I'd be -0.1 on changing the latter. I think it would be strange if I/O routines would accept a different syntax from the literals. Also, the behavior of a cast from string/text to a numeric type is usually defined in terms of what the literal syntax is, so they need to be aligned.