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

Re: BUG in date_part

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Alexandru COSTIN <acostin(at)NOSPAMrds(dot)ro>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG in date_part
Date: 2000-10-10 00:49:48
Message-ID: 200010100049.UAA02863@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
[ Charset ISO-8859-1 unsupported, converting... ]
>     Hello,
>     I've discovered a bug in the date_part function. It returns 25 when
> doing select date_part('day','2000-03-26'::date);
>     Anyway, this isn't happening if casting the date to timestamp
>     select date_part('day','2000-03-26'::timestamp);

It is fixed in current sources:
	
	test=>  select date_part('day','2000-03-26'::date);
	 date_part 
	-----------
	        26
	(1 row)

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

pgsql-bugs by date

Next:From: Bruce MomjianDate: 2000-10-10 02:43:26
Subject: Re: SSL support
Previous:From: Stephan SzaboDate: 2000-10-09 23:43:10
Subject: Re: Regular expression not working [^xyz]

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