two minor issues with date time types - Mailing list pgsql-bugs

From scott.marlowe
Subject two minor issues with date time types
Date
Msg-id Pine.LNX.4.33.0308141023450.24989-100000@css120.ihs.com
Whole thread Raw
Responses Re: two minor issues with date time types  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
List pgsql-bugs
Just two minor issues with timestamps:

Error message is currently:

create table test (ts timestamp);
-- insert an illegal date:
insert into test values ('20021131');
invalid input syntax for timestamp: "20021131"

SQL92 and 99 say it should be:

data exception-datetime field overflow

No big deal, and it doesn't matter to me if it gets changed or not really,
just FYI.



The other issue is that the ranges allowed by SQL spec for timezone are
-12:59 to +1300

but postgresql currently allows numbers outside that range.


create table test (tm time);
insert into test values ('12:00 +1359');
INSERT 17172 1
insert into test values ('12:00 +1360');
ERROR:  invalid input syntax for time: "12:00 +1360"
insert into test values ('12:00 -1359');
INSERT 17175 1
insert into test values ('12:00 -1400');
ERROR:  invalid input syntax for time: "12:00 -1400"

Is there a reason to allow +/-1359 (i.e. the international standards
changed after the SQL spec was written?) when the spec is pretty clear
it's -1259 to +1300?

pgsql-bugs by date:

Previous
From: Kevin Houle
Date:
Subject: DBD::Pg 'lo_read' fails on >= 32768 byte large objects
Next
From: Stephan Szabo
Date:
Subject: Re: two minor issues with date time types