Skip site navigation (1) Skip section navigation (2)

Re: Bug in date_part()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: phil(at)Stimpy(dot)netroedge(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug in date_part()
Date: 2001-01-17 17:13:20
Message-ID: 17623.979751600@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
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

In response to

Responses

pgsql-bugs by date

Next:From: philDate: 2001-01-17 20:27:04
Subject: Re: Bug in date_part()
Previous:From: Tom LaneDate: 2001-01-17 17:08:31
Subject: Re: heap_sysoffset is not found

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group