pgsql: Reject nonzero day fields in AT TIME ZONE INTERVAL functions.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Reject nonzero day fields in AT TIME ZONE INTERVAL functions.
Date: 2013-01-31 17:12:38
Message-ID: E1U0xgk-0005sd-O6@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/9afc58396af75d59ea2eec467724faf68fe63890

Modified Files
--------------
src/backend/utils/adt/date.c | 4 ++--
src/backend/utils/adt/timestamp.c | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Simon Riggs 2013-01-31 19:31:42 pgsql: Switch timelines if we crash soon after promotion.
Previous Message Magnus Hagander 2013-01-31 14:10:03 pgsql: Properly zero-pad the day-of-year part of the win32 build number