| From: | Bruce Momjian <bruce(at)momjian(dot)us> |
|---|---|
| To: | Neil Conway <neilc(at)samurai(dot)com> |
| Cc: | pgsql-bugs(at)postgresql(dot)org |
| Subject: | Re: date -> timestamp casting bug (integer datetimes) |
| Date: | 2007-05-16 15:46:50 |
| Message-ID: | 200705161546.l4GFkon08079@momjian.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
This has been saved for the 8.4 release:
http://momjian.postgresql.org/cgi-bin/pgpatches_hold
---------------------------------------------------------------------------
Neil Conway wrote:
> When integer datetimes are in use, the legal range of the "date" type
> actually exceeds that of the "timestamp" type. However, the cast from
> date => timestamp fails to take this into account:
>
> postgres=# select '01-01-5874896'::date::timestamp;
> timestamp
> ----------------------------
> 29355-07-05 15:41:44.48384
> (1 row)
>
> The cast works correctly with FP-based datetimes.
>
> Should be simple to fix, but I won't have the free cycles to do it for a
> little while, so if anyone wants to take a shot at it in the meanwhile,
> they are more than welcome...
>
> -Neil
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Neil Conway | 2007-05-16 15:50:05 | Re: date -> timestamp casting bug (integer datetimes) |
| Previous Message | Bruce Momjian | 2007-05-16 00:52:11 | Re: BUG #3048: pg_dump dumps intarray metadata incorrectly |