aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/float.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-01-21 22:26:20 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2016-01-21 22:26:20 -0500
commit647d87c56ab6da70adb753c08d7cdf7ee905ea8a (patch)
treed0ea892d43d8f94c7171c04d934f9dad634027d0 /src/backend/utils/adt/float.c
parentd9b9289c837a98b78b948b597fabd9ab0a96c0db (diff)
downloadpostgresql-647d87c56ab6da70adb753c08d7cdf7ee905ea8a.tar.gz
postgresql-647d87c56ab6da70adb753c08d7cdf7ee905ea8a.zip
Make extract() do something more reasonable with infinite datetimes.
Historically, extract() just returned zero for any case involving an infinite timestamp[tz] input; even cases in which the unit name was invalid. This is not very sensible. Instead, return infinity or -infinity as appropriate when the requested field is one that is monotonically increasing (e.g, year, epoch), or NULL when it is not (e.g., day, hour). Also, throw the expected errors for bad unit names. BACKWARDS INCOMPATIBLE CHANGE Vitaly Burovoy, reviewed by Vik Fearing
Diffstat (limited to 'src/backend/utils/adt/float.c')
0 files changed, 0 insertions, 0 deletions