date_part bug? - Mailing list pgsql-general

From Tim Williams
Subject date_part bug?
Date
Msg-id 367946C9.A9A8D3D6@ugsolutions.com
Whole thread Raw
Responses Re: [GENERAL] date_part bug?
List pgsql-general
Greetings,

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?

Thanks much in advance,
- Tim


pgsql-general by date:

Previous
From: Hal Snyder
Date:
Subject: Re: [GENERAL] Why PostgreSQL is better than other commerial softwares?
Next
From: Gregory Maxwell
Date:
Subject: Re: [GENERAL] Why PostgreSQL is better than other commerial softwares?