From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Allow to_timestamp(float8) to convert float infinity to timestam |
Date: | 2016-03-29 21:09:42 |
Message-ID: | E1al0tS-0000cn-8y@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
Allow to_timestamp(float8) to convert float infinity to timestamp infinity.
With the original SQL-function implementation, such cases failed because
we don't support infinite intervals. Converting the function to C lets
us bypass the interval representation, which should be a bit faster as
well as more flexible.
Vitaly Burovoy, reviewed by Anastasia Lubennikova
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/e511d878f3bbc205cd260a79740e646eea3c1cd3
Modified Files
--------------
doc/src/sgml/func.sgml | 50 +++++++++++++-------------
src/backend/utils/adt/timestamp.c | 58 +++++++++++++++++++++++++++++++
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.h | 2 +-
src/include/utils/timestamp.h | 1 +
src/test/regress/expected/timestamptz.out | 47 +++++++++++++++++++++++++
src/test/regress/sql/timestamptz.sql | 15 ++++++++
7 files changed, 149 insertions(+), 26 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-03-29 21:21:17 | pgsql: Fix interval_mul() to not produce insane results. |
Previous Message | Robert Haas | 2016-03-29 19:25:50 | pgsql: Fix bug in aggregate (de)serialization commit. |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-03-29 21:22:29 | Re: [PATCH] Supporting +-Infinity values by to_timestamp(float8) |
Previous Message | Joshua Ma | 2016-03-29 21:05:47 | pg_restore casts check constraints differently |