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 1oiB71-0005d7-38 for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Oct 2022 08:59:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oiB6z-00017j-PK for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Oct 2022 08:59:41 +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 1oiB6y-00017U-Qi for pgsql-hackers@lists.postgresql.org; Tue, 11 Oct 2022 08:59:41 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oiB6v-0007oA-Au for pgsql-hackers@postgresql.org; Tue, 11 Oct 2022 08:59:40 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id ABA5D5C0195; Tue, 11 Oct 2022 04:59:32 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 11 Oct 2022 04:59:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id: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=fm3; t=1665478772; x= 1665565172; bh=dJ7nWeBHrQuiCBG893/Fncb4h5S7h/AXjLuv4UW2wtM=; b=e kw99RG7ZFo6U/BAJq4eO6k69F2D1pM77WYHH6mqNmxBUIx4PbCfO7iPxw70YYvkm Lzg9Z1jYLeyfhOz8jDqo/+BOkRwnOZS4LvMz9Epm53efOOFB/z56O95sxfyaUFPX fKX53lCspfsGujTWSECx+rHmzBK1Zhx+CLBaOhQKTrjmmHXqECiM7qlAVe87JC/N OIpW+NJbioUd07MDDX4vV8rE/fvkRa9YM60qLivnLNs4Ow4kSeXtTfPSWNqf0Jn4 nfazbilGcUm8ykbjxUV03C7bVe9e6W2NZwKxzijQCpzgr3HgzIXkuMOKI402jURf gWZRw2HLVEGGGOijSbIRQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeejiedgtdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfevfhfhjggtgfesth ejredttdefjeenucfhrhhomheprfgvthgvrhcugfhishgvnhhtrhgruhhtuceophgvthgv rhdrvghishgvnhhtrhgruhhtsegvnhhtvghrphhrihhsvggusgdrtghomheqnecuggftrf grthhtvghrnhepheelffeggedujeetiefhleetuddvieffhfffvdejvdffgeejkeduledu heduieefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epphgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 11 Oct 2022 04:59:31 -0400 (EDT) Message-ID: <51dacd4a-3556-aa60-8d74-9d6b078fd97e@enterprisedb.com> Date: Tue, 11 Oct 2022 10:59:30 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: Non-decimal integer literals Content-Language: en-US To: Junwang Zhao Cc: pgsql-hackers References: <0f37d2ec-6689-4d23-7ba5-4d2a73c2666f@enterprisedb.com> <577603ec-787b-61b8-23a2-1bd0457ed1c7@enterprisedb.com> <2317133.1643155358@sss.pgh.pa.us> <97aa22d7-b80f-efa1-f368-3dbf73a15980@enterprisedb.com> <071c40f2-15cf-5db3-8799-dbac041bb881@enterprisedb.com> From: Peter Eisentraut In-Reply-To: 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 11.10.22 05:29, Junwang Zhao wrote: > What do you think if we move these code into a static inline function? like: > > static inline char* > process_digits(char *ptr, int32 *result) > { > ... > } How would you handle the different ways each branch checks for valid digits and computes the value of each digit?