Re: Since '2001-09-09 01:46:40'::timestamp microseconds are lost when extracting epoch

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Petr Fedorov <petr(dot)fedorov(at)phystech(dot)edu>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Since '2001-09-09 01:46:40'::timestamp microseconds are lost when extracting epoch
Date: 2019-12-01 22:50:00
Message-ID: CA+hUKGKgHUbFNKRhvodn4mVU-oqje+HA7jTg_XrWRo4UGhFoqg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Sat, Nov 30, 2019 at 10:28 PM Petr Fedorov <petr(dot)fedorov(at)phystech(dot)edu> wrote:
> Obviously, it is due to the fact that extract epoch returns double
> precision which in turn has 15 decimal digits precision.

I guess this deviation from the SQL standard ("exact numeric") made
sense when PostgreSQL used double for timestamps, but would break a
lot of queries if we changed it.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2019-12-01 22:59:11 Re: Since '2001-09-09 01:46:40'::timestamp microseconds are lost when extracting epoch
Previous Message Tom Lane 2019-11-30 17:32:38 Re: BUG #15383: Join Filter cost estimation problem in 10.5

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-12-01 22:59:11 Re: Since '2001-09-09 01:46:40'::timestamp microseconds are lost when extracting epoch
Previous Message Tom Lane 2019-12-01 21:34:38 Re: Bogus EXPLAIN results with column aliases for mismatched partitions