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 1ltEPV-0003hX-V8 for pgsql-general@arkaria.postgresql.org; Tue, 15 Jun 2021 19:07:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ltEPU-000763-HB for pgsql-general@arkaria.postgresql.org; Tue, 15 Jun 2021 19:07:40 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ltEPU-00075v-7t for pgsql-general@lists.postgresql.org; Tue, 15 Jun 2021 19:07:40 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ltEPO-0006UK-3c for pgsql-general@postgresql.org; Tue, 15 Jun 2021 19:07:39 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 8A1A116CC; Tue, 15 Jun 2021 15:07:32 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 15 Jun 2021 15:07:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=/ NpZzySiZUUgp50hCMnLG6JXUQYNfwSXhRT07+Td8cY=; b=gQj9xr+ksG2sZb5DL 24cCm3OjeOTzoB5Mskkp23sl/hkPAGlJCHGAhS9b1K51Jul9M+W8rTjYruW6BL1s lCVTH/SLS1Ovc7kllUTfqWbF0n1CZXftw8niR7x4BtxE4J7xYbmI0GIw4G266F4B oO1yfSbxII2ghaeggj2rz1O3c0+2OL+lMPweIH6R0QBS6cM+7H3bkNHMXD74J1JP LjK2V3Xipc3U5g7T741dMDycl37wPuSElpkUIkyluMBsKMgwn/ITMHF9IgYmeOJ6 N2k2WMySBT1VkMnVRO0JaKeFdDP8/LLiPrSbCoks916W5SfcJqAjFLFoYVcDe8Au UasbQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=fm3; bh=/NpZzySiZUUgp50hCMnLG6JXUQYNfwSXhRT07+Td8 cY=; b=s6yvI4JokU4/ffRS8AfnRKfZgNB+mmN8IK/fPCDibgYXz3AX7Px55FWIL zy/3Hv7DxQDXAmBXK/3ARYlqYsvosCu8XGDv+0QzAKPT3jEE2Tgjux7ivDFWdTlU FfLLdvbKm6g1envly44H1fUcKSRtHojEtojKGZek8jyFo75y13kweFnkhFjNJde2 FI+wzL312G21lLNGzDD/gOCzm8AXhhaDqAfKA9Y7lC/lrwD6VOX6PfDEBaMieXQj vt3+yk5BmQq/k1QUu9pU6iV86p5GOAPxOktWKo59nSB6iPXPLQMNZ3SQYDhDkvrL wyyFDBTDFZalr6ul34h3RbevEbrew== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfedvjedgudefgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuggftrfgrthhtvghrnhepteejvdetffejuedvleeifeefheeutdfhgfdvhffh hfekvdduveegvdejudefgfevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 15 Jun 2021 15:07:31 -0400 (EDT) Subject: Re: CONCAT function adding extra characters To: AI Rumman , pgsql-general General References: From: Adrian Klaver Message-ID: <675f0952-cca1-2e8a-b0fe-ad36ca4f3548@aklaver.com> Date: Tue, 15 Jun 2021 12:07:30 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 6/15/21 11:55 AM, AI Rumman wrote: > I am using Postgresql 10 and seeing a strange behavior in CONCAT > function when I am concatenating double precision and int with a separator. > > select concat('41.1'::double precision,':', 20); > Result: > 41.1000000000000014:20 > > > Value 41.1 which double precision converts to 41.1000000014. > > Is that expected? Aah, too quick on the trigger. Also: Is there a home brewed version of CONCAT() in the search_path? > > Thanks. -- Adrian Klaver adrian.klaver@aklaver.com