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 1lTeZk-0007C7-NU for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Apr 2021 05:48:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lTeZi-0005o2-NN for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Apr 2021 05:48:30 +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 1lTeZh-0005ns-R6 for pgsql-hackers@lists.postgresql.org; Tue, 06 Apr 2021 05:48:30 +0000 Received: from wforward2-smtp.messagingengine.com ([64.147.123.31]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lTeZe-0003fY-S4 for pgsql-hackers@postgresql.org; Tue, 06 Apr 2021 05:48:28 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailforward.west.internal (Postfix) with ESMTP id B5690149B; Tue, 6 Apr 2021 01:48:24 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 06 Apr 2021 01:48:25 -0400 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=fm2; bh=BFlnsrXI4O8/6Qh9pnkQ6as5OjU34Uym0jrWEnx7/ 90=; b=j+KQIFGPxQCKGE/T2e6X2M3z2MRyBFzjkBif4/jKoaS3PbHT8ZotwITpS 4IJk+e5BIFXDU+moU38m5FDRrjG0ytXXu2UKPk8lt6oJwBw3EQvSl2Hx8AhRshDm VRj2sx1QLQ9ytHlkpAFnjFVpIT0srh3gKhb7vFgp5b8aLoaC2Nm0iH08xYXVdzMm //gB8Q7gRqZAntwQDhpF7RooGnHsLVPO9tPpNnc7Aua6GqRxAUGLfBBnAVI56+AV 7FeLEJLJDLpAUVHBFIAXTgbkzbr6h8Y69AzKEML0GRxpItTPwiIbZE2H7BonAInj iVdeV8AwzgC1ZRf00mtUxIGIkS8Nw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudejfedguddttdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefuhffvfhfkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvdhnug hquhgrughrrghnthdrtghomheqnecuggftrfgrthhtvghrnhepfeeliedugeehveetgfeu leetudetffegieejheevveeluddvtdehhfehleehudegnecukfhppeeluddrudegrddvfe dvrdeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhep phgvthgvrhdrvghishgvnhhtrhgruhhtsedvnhguqhhurggurhgrnhhtrdgtohhm X-ME-Proxy: Received: from laptop206oxuk.local (p5b0ee806.dip0.t-ipconnect.de [91.14.232.6]) by mail.messagingengine.com (Postfix) with ESMTPA id 088EA108005C; Tue, 6 Apr 2021 01:48:22 -0400 (EDT) Subject: Re: Since '2001-09-09 01:46:40'::timestamp microseconds are lost when extracting epoch From: Peter Eisentraut To: pgsql-hackers Cc: David Steele , Pavel Stehule , Thomas Munro , Petr Fedorov , Tom Lane References: <1551357.1599435992@sss.pgh.pa.us> <097a4242-0748-98e3-06ab-ded1d366cd76@2ndquadrant.com> <1893468.1599658711@sss.pgh.pa.us> <38fc499a-ae52-efb6-aad6-82f812d6782d@2ndquadrant.com> <20200917055327.GU2873@paquier.xyz> <20200930071543.GL1996@paquier.xyz> <2fb99632-9302-6509-78ce-3aaed3fd7f40@2ndquadrant.com> <3ff4be02-1e2b-564f-9b53-3dc561da8218@pgmasters.net> <3013402.1615829712@sss.pgh.pa.us> <8fae8673-0d5b-12d9-7342-daed0d590594@2ndquadrant.com> <901bcfb8-36c8-27b2-b148-042392992eeb@2ndquadrant.com> <4158031.1616184417@sss.pgh.pa.us> <75db3efe-8023-58ef-9ee4-8a6a3101c7ca@2ndquadrant.com> Message-ID: <7594008a-5f47-ae29-3122-42d13228fd9e@2ndquadrant.com> Date: Tue, 6 Apr 2021 07:48:21 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: <75db3efe-8023-58ef-9ee4-8a6a3101c7ca@2ndquadrant.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 01.04.21 20:49, Peter Eisentraut wrote: > also done > > I also figured out a way to combine the float8 and numeric > implementations so that there is not so much duplication.  Added tests > to cover all the edge and overflow cases. > > I think this is solid now. > > The extract(julian from timestamp) is still a bit in the slow mode, but > as I previously stated, it's not documented and gives the wrong result, > so it's not clear whether it should be fixed and what it should do.  I > think I'll register that part as an open item in any case, to see what > we should do about that. committed and done