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

Re: [GENERAL] date_part bug?

From: Oleg Broytmann <phd(at)sun(dot)med(dot)ru>
To: Tim Williams <williams(at)ugsolutions(dot)com>
Cc: pgsql-general(at)postgreSQL(dot)org, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [GENERAL] date_part bug?
Date: 1998-12-18 08:41:34
Message-ID: Pine.SOL2.3.96.SK.981218113753.5955A-100000@sun.med.ru (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
Hello!

On Thu, 17 Dec 1998, Tim Williams wrote:
> When I run the following set of statements in postgres v6.4 (built on
> Debian Linux):
> 
> create table tmp (v1 date, v2 datetime);
> insert into tmp values ('06-01-1999', '06-01-1999');
> select date_part('month', v1) as m1, date_part('month', v2) as m2 from
> tmp;
> 
> I see the following results:
> 
> m1|m2
> --+--
>  5| 6
> (1 row)
> 
> Why is date_part giving different results for date and date_time?  Why
> is it wrong for 'date'? Anybody seen this before?

   I tried this and it works pretty good for me on Solaris.
   It looks like an error in postgres on glibc2-based linux platform. It is
discussing now on pgsql-hackers list. The solution is not ready yet. I am
working on this with a good deal of help from other people...

Oleg.
---- 
  Oleg Broytmann     http://members.tripod.com/~phd2/     phd2(at)earthling(dot)net
           Programmers don't die, they just GOSUB without RETURN.


pgsql-hackers by date

Next:From: Oliver ElphickDate: 1998-12-18 09:48:07
Subject: Re: [GENERAL] date_part bug?
Previous:From: Jan WieckDate: 1998-12-18 08:28:39
Subject: Re: [HACKERS] CURRENT: crash in select_view regression test...

pgsql-general by date

Next:From: Anton de WetDate: 1998-12-18 08:57:55
Subject: Re: [GENERAL] Why PostgreSQL is better than other commerial softwares?
Previous:From: Oliver ElphickDate: 1998-12-17 22:01:17
Subject: Re: [GENERAL] Why PostgreSQL is better than other commerial softwares?

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