| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | "Dan Langille" <dan(at)langille(dot)org> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: possible time change issue - known problem? |
| Date: | 2003-04-07 16:05:13 |
| Message-ID: | 6044.1049731513@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
"Dan Langille" <dan(at)langille(dot)org> writes:
> OK, I'll say again. The problem was not present on my 7.3.2 box but
> was on the 7.2.3 box.
Oh, I see: you're not testing the right thing. In 7.3, 'date - interval'
promotes to 'timestamp without time zone - interval':
regression=# select current_date, (current_date - interval '24 hours');
date | ?column?
------------+---------------------
2003-04-07 | 2003-04-06 00:00:00
(1 row)
which is a crude but effective way of sidestepping the issue. But if
you do the same calculation 7.2 did:
regression=# select current_date, (current_date::timestamptz - interval '24 hours');
date | ?column?
------------+------------------------
2003-04-07 | 2003-04-05 23:00:00-05
(1 row)
you'll still get the same unwanted result.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andy Kriger | 2003-04-07 16:38:54 | Re: extracting time from a timestamp with time zone field |
| Previous Message | Dan Langille | 2003-04-07 15:56:56 | Re: possible time change issue - known problem? |