Reject combining "epoch" and "infinity" with other datetime fields.
commitbcc704b52490492e6bd73c4444056b3e9644504d
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 9 Mar 2023 21:49:03 +0000 (9 16:49 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 9 Mar 2023 21:49:03 +0000 (9 16:49 -0500)
treebc9b625207a9752b5728af4bbbeef347fc75c368
parent27b62377b47f9e7bf58613608bc718c86ea91e91
Reject combining "epoch" and "infinity" with other datetime fields.

Datetime input formerly accepted combinations such as
'1995-08-06 infinity', but this seems like a clear error.
Reject any combination of regular y/m/d/h/m/s fields with
these special tokens.

Joseph Koshakow, reviewed by Keisuke Kuroda and myself

Discussion: https://postgr.es/m/CAAvxfHdm8wwXwG_FFRaJ1nTHiMWb7YXS2YKCzCt8Q0a2ZoMcHg@mail.gmail.com
src/backend/utils/adt/datetime.c
src/test/regress/expected/horology.out
src/test/regress/sql/horology.sql