Re: Bug in date_part()
От | phil@Stimpy.netroedge.com |
---|---|
Тема | Re: Bug in date_part() |
Дата | |
Msg-id | 20010117122704.Y30590@Stimpy.netroedge.com обсуждение исходный текст |
Ответ на | Re: Bug in date_part() (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | 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@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@Stimpy.netroedge.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@netroedge.com -- http://www.netroedge.com/~phil PGP F16: 01 D2 FD 01 B5 46 F4 F0 3A 8B 9D 7E 14 7F FB 7A
В списке pgsql-bugs по дате отправления: