pgsql: Allow to_timestamp(float8) to convert float infinity to timestam - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Allow to_timestamp(float8) to convert float infinity to timestam
Date
Msg-id E1al0tS-0000cn-8y@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: Fix bug in aggregate (de)serialization commit.
Next
From: Tom Lane
Date:
Subject: pgsql: Fix interval_mul() to not produce insane results.