pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Fetter <david@fetter.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Petr Fedorov <petr.fedorov@phystech.edu>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Since '2001-09-09 01:46:40'::timestamp microseconds are lost when extracting epoch
Date: Mon, 25 May 2020 21:29:21 +0200
Message-ID: <20200525192921.GL13741@fetter.org> (raw)
In-Reply-To: <27490.1590414212@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>
	<27490.1590414212@sss.pgh.pa.us>

On Mon, May 25, 2020 at 09:43:32AM -0400, Tom Lane wrote:
> Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> > One problem (other than perhaps performance, tbd.) is that this would no 
> > longer allow processing infinite timestamps, since numeric does not 
> > support infinity.  It could be argued that running extract() on infinite 
> > timestamps isn't very useful, but it's something to consider explicitly.
> 
> I wonder if it's time to fix that, ie introduce +-Infinity into numeric.c.
> This isn't the first time we've seen issues with numeric not being a
> superset of float, and it won't be the last.
> 
> At first glance there's no free bits in the on-disk format for numeric,
> but we could do something by defining the low-order bits of the header
> word for a NaN to distinguish between real NaN and +/- infinity.
> It looks like those bits should reliably be zero right now.

+1 for adding +/- infinity to NUMERIC.

Best,
David.
-- 
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate





view thread (47+ messages)  latest in thread

Message-ID: <20200525192921.GL13741@fetter.org>
Permalink:  ../20200525192921.GL13741@fetter.org/
Also on:    postgresql.org/message-id/20200525192921.GL13741@fetter.org

 · 

reply

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: david@fetter.org, tgl@sss.pgh.pa.us, peter.eisentraut@2ndquadrant.com, thomas.munro@gmail.com, petr.fedorov@phystech.edu, pgsql-hackers@postgresql.org
  Subject: Re: Since '2001-09-09 01:46:40'::timestamp microseconds are lost when extracting epoch
  In-Reply-To: <20200525192921.GL13741@fetter.org>

* 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