On Wed, 29 Mar 2000, Stefan Loidl wrote:
> I'm currently using postgres 6.4.2 on Sun Solaris.
> There seems to be a strange bug in the date_part() function.
> See below:
> 
> accounting=> SELECT date_part('day','03-26-2000'::date);

I've tested it with PG6.5.3 on Intel/Linux - no prob here.

Could it be because of the 29th of Feb, 2000 ?
Could you try 2nd of March 2000, and 27th of Feb 2000 ?
Maybe thats an OS level issue...

Cheers, Silvio

> date_part
> ---------
>        25
> (1 row)
> 
> Whereas it works with a cast to datetime:
> 
> accounting=> SELECT date_part('day','03-26-2000'::datetime);
> date_part
> ---------
>        26
> (1 row)
> 
> For other dates both versions have the same correct result.
> 
> Can somebody check if this bug also occurs in 6.5.3 or 7.0beta?
> 
> Greetings,
> Stefan
> 
> -- 
> Stefan Loidl                    Phone:  +49 89 289-28882
> Leibniz-Rechenzentrum           Fax:    +49 89 2809460
> Barer Str. 21                   mailto:[EMAIL PROTECTED]
> 80333 Munich, Germany           http://www.lrz.de
> 

``````````` Silvio Emanuel Nunes Barbosa de Macedo (PhD Std) '''''''''''''
[EMAIL PROTECTED]                                         [EMAIL PROTECTED]
Intelligent and Interactive Systems                Telecom. and Multimedia
Imperial College, University of London                         INESC Porto 
Exhibition Road,                                       Pc da Republica, 93
London SW7 2AZ, England                            4050-497 Porto Portugal
Tel:+44 171 5946323                                    Tel:+351 22 2094220

Reply via email to