From: | Andrew Chernow <ac(at)esilo(dot)com> |
---|---|
To: | pgsql-hackers list <pgsql-hackers(at)postgresql(dot)org> |
Cc: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
Subject: | timetz range check issue |
Date: | 2007-12-22 03:42:23 |
Message-ID: | 476C879F.7050504@esilo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
When inserting a timetz in binary mode, there are no range checks on the time
value (nor on the zone). In text mode, things are fine:
postgres=# insert into t values ('24:00:00.000001-05'::timetz);
ERROR: date/time field value out of range: "24:00:00.000001-05"
// 24:00:00.000001-05
double d = ((24 * MINS_PER_HOUR + 0) * SECS_PER_MINUTE) + 0 + 0.000001);
postgres=# select * from t;
val
--------------------
24:00:00.000001-05
It displays it correctly, but it doesn't seem like proper behavior. If I insert
25:00:00.000000-05, I get nothing:
postgres=# select * from t;
val
-----
(1 row)
QUERY-LOG:
LOG: execute <unnamed>: INSERT INTO timetz_test VALUES ($1)
DETAIL: parameters: $1 = 'p£ '
I get no error from libpq. I think a range check is needed in timetz_recv &
time_recv.
version: (interger_datetimes=off)
PostgreSQL 8.3devel on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.1.1
20070105 (Red Hat 4.1.1-52)
Andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2007-12-22 05:14:01 | Re: pgsql: Improve wording. |
Previous Message | Bruce Momjian | 2007-12-22 02:50:08 | Re: New style of hash join proposal |