Reject nonzero day fields in AT TIME ZONE INTERVAL functions.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 31 Jan 2013 17:12:23 +0000 (12:12 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 31 Jan 2013 17:12:23 +0000 (12:12 -0500)
commit9afc58396af75d59ea2eec467724faf68fe63890
treec1d8b77deb4ecdcfd2ddeb81603de6c5b616ca7c
parentbfb8a8d3818972faf1976eccedddfaee7eb0f613
Reject nonzero day fields in AT TIME ZONE INTERVAL functions.

It's not sensible for an interval that's used as a time zone value to be
larger than a day.  When we changed the interval type to contain a separate
day field, check_timezone() was adjusted to reject nonzero day values, but
timetz_izone(), timestamp_izone(), and timestamptz_izone() evidently were
overlooked.

While at it, make the error messages for these three cases consistent.
src/backend/utils/adt/date.c
src/backend/utils/adt/timestamp.c