Allow to_timestamp(float8) to convert float infinity to timestamp infinity.
Tom Lane <tgl@sss.pgh.pa.us>
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
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/func.sgml | modified | +26 −24 |
| src/backend/utils/adt/timestamp.c | modified | +58 −0 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_proc.h | modified | +1 −1 |
| src/include/utils/timestamp.h | modified | +1 −0 |
| src/test/regress/expected/timestamptz.out | modified | +47 −0 |
| src/test/regress/sql/timestamptz.sql | modified | +15 −0 |