From: | phil(at)Stimpy(dot)netroedge(dot)com |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: Bug in date_part() |
Date: | 2001-01-17 20:27:04 |
Message-ID: | 20010117122704.Y30590@Stimpy.netroedge.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Thanks for the reply Tom Lane, and Tom Lockhart. On my 7.0.3:
phil=# select '4/1/2001'::date::timestamp;
?column?
------------------------
2001-03-31 23:00:00-08
(1 row)
This was built from source downloaded from the primary FTP site link
on www.postgresql.org.
[cartret(at)Stimpy signup]$ psql --version
psql (PostgreSQL) 7.0.3
This machine is a redhat 5.0 based machine, although it's gone through
a lot of software updates (mostly by hand).
I have not tried the latest CVS/developer code, so perhaps it is
fixed. Is there a chance that this bug is actually outside of
postgresql? Like in a shared lib or something? Like I noted, this is
an old RH install with updates, but very likely has some old libs and
stuff on it.
BTW- I've solved my issue by using a perl function to figure out the
dow, so this follow up is purely for your assistance in squashing the
bug if it hasn't already.
Thanks!
Phil
On Wed, Jan 17, 2001 at 12:13:20PM -0500, Tom Lane wrote:
> phil(at)Stimpy(dot)netroedge(dot)com writes:
> > edge=# select date_part('dow','4/1/2001'::date)::int4;
> > ?column?
> > ----------
> > 6
> > (1 row)
>
> Seems to be fixed in current sources:
>
> regression=# select date_part('dow','4/1/2001'::date)::int4;
> ?column?
> ----------
> 0
> (1 row)
>
>
> I think this is a side-effect of the known 7.0 bug in date-to-timestamp
> conversion on DST transition days. Check out
>
> select '4/1/2001'::date::timestamp;
>
> regards, tom lane
--
Philip Edelbrock -- IS Manager -- Edge Design, Corvallis, OR
phil(at)netroedge(dot)com -- http://www.netroedge.com/~phil
PGP F16: 01 D2 FD 01 B5 46 F4 F0 3A 8B 9D 7E 14 7F FB 7A
From | Date | Subject | |
---|---|---|---|
Next Message | Koch, Kevin | 2001-01-17 20:47:00 | Install/regression test instructions don't work. |
Previous Message | Tom Lane | 2001-01-17 17:13:20 | Re: Bug in date_part() |