two minor issues with date time types

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: two minor issues with date time types
Date: 2003-08-14 16:34:58
Message-ID: Pine.LNX.4.33.0308141023450.24989-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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?

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message scott.marlowe 2003-08-14 16:38:06 followup on the timezone issue
Previous Message Pavel Stehule 2003-08-14 15:09:07 Re: segmention fault in psql from last cvs (long)