Clean up a couple of weird corner cases in interval parsing: make -yyyy-mm be
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 16 Sep 2008 22:31:21 +0000 (22:31 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 16 Sep 2008 22:31:21 +0000 (22:31 +0000)
commitd8b81e6f69d371871cb90b18c279546974c6a11b
tree2f23b9c82ac231dd62218554da00c0a08e938369
parent756d0a8dec4bb5d2351b569d9becfa49f7940025
Clean up a couple of weird corner cases in interval parsing: make -yyyy-mm be
interpreted as expected (the sign should affect months too), and get rid of
hard-wired assumption that unmarked signed values must be hours (if integers)
or seconds (if floats).  The former was just a bug in my previous patch,
while the latter may have made sense at one time but seems illogical now
that we support determination of the units from typmod information.
Ron Mayer and myself.
src/backend/utils/adt/datetime.c
src/test/regress/expected/interval.out
src/test/regress/sql/interval.sql