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

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to