From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Petr Fedorov <petr.fedorov@phystech.edu>
Subject: Re: Since '2001-09-09 01:46:40'::timestamp microseconds are lost when extracting epoch
Date: Wed, 9 Sep 2020 10:08:06 +0200
Message-ID: <097a4242-0748-98e3-06ab-ded1d366cd76@2ndquadrant.com> (raw)
In-Reply-To: <1551357.1599435992@sss.pgh.pa.us>
References: <42b73d2d-da12-ba9f-570a-420e0cce19d9@phystech.edu>
<CA+hUKGKgHUbFNKRhvodn4mVU-oqje+HA7jTg_XrWRo4UGhFoqg@mail.gmail.com>
<18389.1575241151@sss.pgh.pa.us>
<1c2262e2-6812-7baa-cbdd-63039db12952@phystech.edu>
<CA+hUKGK+K8NyS57tU841m1tSF6ha3W0udN2dw_Hbc=D_0OPbmA@mail.gmail.com>
<ee683994-8f7c-aded-be43-543e66e68b94@2ndquadrant.com>
<a3be61d9-f44b-7fce-3dc8-d700fdfb6f48@2ndquadrant.com>
<CAFj8pRC8cgoiQMT235cky4Pa40gj=s0m3PftmaJLSt9MAiwj_Q@mail.gmail.com>
<be30c07c-3f7b-7c86-f1c5-d0858046b26f@2ndquadrant.com>
<1551357.1599435992@sss.pgh.pa.us>
On 2020-09-07 01:46, Tom Lane wrote:
> Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
>> Here is a new patch series version.
>> I have created a new internal function for converting integers to
>> numeric, to make the implementation a bit more elegant and compact.
>
> I reviewed the 0002 patch, finding one bug (in int8_sum)
Ouch, no test coverage. Should we perhaps remove this function, since
it's obsolete and unused?
> and a few
> more calls of int8_numeric that could be converted. I think the
> attached updated version is committable, and I'd recommend going
> ahead with that regardless of the rest of this. I hadn't realized
> how many random calls of int8_numeric and int4_numeric we'd grown,
> but there are a lot, so this is nice cleanup.
Yes, please go ahead with it.
> I continue to think that we can't commit 0003 in this form, because
> of the breakage that will ensure in stored views. As I said upthread,
> we should leave the existing SQL-exposed functions alone, invent
> new ones that return numeric, and alter the parser to translate
> EXTRACT constructs to the new functions. This approach would also
> provide an "out" for anyone who does complain about the performance
> cost --- they can just continue to use the old functions.
Okay, I will continue looking into this.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: peter.eisentraut@2ndquadrant.com, tgl@sss.pgh.pa.us, pavel.stehule@gmail.com, pgsql-hackers@postgresql.org, thomas.munro@gmail.com, petr.fedorov@phystech.edu
Subject: Re: Since '2001-09-09 01:46:40'::timestamp microseconds are lost when extracting epoch
In-Reply-To: <097a4242-0748-98e3-06ab-ded1d366cd76@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox