Reject nonzero day fields in AT TIME ZONE INTERVAL functions.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 9afc58396af75d59ea2eec467724faf68fe63890
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2013-01-31T17:12:23Z
Releases: 9.3.0
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.

Files

PathChange+/−
src/backend/utils/adt/date.c modified +2 −2
src/backend/utils/adt/timestamp.c modified +4 −4