From salvamaine@yahoo.com Wed Mar 28 11:10:37 2001 Received: from news.tht.net (news.hub.org [216.126.91.242]) by mail.postgresql.org (8.11.3/8.11.1) with ESMTP id f2SBAaw33877 for ; Wed, 28 Mar 2001 06:10:37 -0500 (EST) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.1/8.11.1) id f2SAqVf96892 for pgsql-admin@postgresql.org; Wed, 28 Mar 2001 05:52:31 -0500 (EST) (envelope-from news) From: Salvador =?iso-8859-1?Q?Main=E9?= X-Newsgroups: comp.databases.postgresql.admin Subject: date_part bug? Date: Wed, 28 Mar 2001 12:51:20 +0200 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 12 Message-ID: <3AC1C228.EBAD97ED@yahoo.com> Reply-To: salva@ronincoders.com Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: scrappy@hub.org X-Mailer: Mozilla 4.75 [es] (X11; U; Linux 2.2.16-22 i586) X-Accept-Language: en To: pgsql-admin@postgresql.org X-Archive-Number: 200103/202 X-Sequence-Number: 1049 Hello: I'm using postgres 7.0.2. When I use date_part('day', date) sometimes I get wrong values. Ie: and date_part('day', '1999-3-28')=27 and date_part('day', '2000-3-26')=25 Is it a bug? -- Salvador Mainé From Ben.Trewern@mowlem.com Wed Mar 28 12:54:09 2001 Received: from xxx-bfhxx-ms001.mowlem.com (mail2.mowlem.com [212.137.27.84]) by mail.postgresql.org (8.11.3/8.11.1) with ESMTP id f2SCs9U10023 for ; Wed, 28 Mar 2001 07:54:09 -0500 (EST) (envelope-from Ben.Trewern@mowlem.com) Received: from xxx-bfhxx-ex002.mowlem.com (unverified) by xxx-bfhxx-ms001.mowlem.com (Content Technologies SMTPRS 4.1.2) with ESMTP id ; Wed, 28 Mar 2001 13:56:13 +0100 Received: by XXX_BFHXX_EX002 with Internet Mail Service (5.5.2650.21) id ; Wed, 28 Mar 2001 13:51:04 +0100 Message-ID: <996802F75C3CD411B424001083FA445B05955C@CET_PONXX_FP001> From: "Trewern, Ben" To: "'salva@ronincoders.com'" , pgsql-admin@postgresql.org Subject: RE: date_part bug? Date: Wed, 28 Mar 2001 13:50:54 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C0B785.BF8CF6D6" X-Archive-Number: 200103/206 X-Sequence-Number: 1053 This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C0B785.BF8CF6D6 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Are you using Mandrake 7.x. It seems to have some problems with rounding and dates because of its use of certain compiler settings. If you are, try using the Postgres 7.0.3 RPMs from one of the ftp mirrors. They seem to work correctly. Regards Ben > -----Original Message----- > From: Salvador Main=E9 [mailto:salvamaine@yahoo.com] > Sent: 28 March 2001 11:51 > To: pgsql-admin@postgresql.org > Subject: [ADMIN] date_part bug? >=20 >=20 > Hello: >=20 > I'm using postgres 7.0.2. When I use date_part('day', date)=20 > sometimes I > get wrong values. Ie:=20 > and date_part('day', '1999-3-28')=3D27 >=20 > and date_part('day', '2000-3-26')=3D25 >=20 > Is it a bug? >=20 > --=20 > Salvador Main=E9 >=20 > ---------------------------(end of=20 > broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to=20 > majordomo@postgresql.org) >=20 ------_=_NextPart_001_01C0B785.BF8CF6D6 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: [ADMIN] date_part bug?

Are you using Mandrake 7.x.  It seems to have some p= roblems with rounding and dates because of its use of certain compiler sett= ings.  If you are, try using the Postgres 7.0.3 RPMs from one of the f= tp mirrors.  They seem to work correctly.

Regards

Ben

> -----Original Message-----
> From: Salvador Main=E9 [mailto:salvamaine@yahoo.com]
> Sent: 28 March 2001 11:51
> To: pgsql-admin@postgresql.org
> Subject: [ADMIN] date_part bug?
>
>
> Hello:
>
> I'm using postgres 7.0.2. When I use date_part('day= ', date)
> sometimes I
> get wrong values. Ie:
> and date_part('day', '1999-3-28')=3D27
>
> and date_part('day', '2000-3-26')=3D25
>
> Is it a bug?
>
> --
> Salvador Main=E9
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the u= nregister command
>     (send "unregister Your= EmailAddressHere" to
> majordomo@postgresql.org)
>

------_=_NextPart_001_01C0B785.BF8CF6D6-- From tgl@sss.pgh.pa.us Wed Mar 28 15:55:47 2001 Received: from sss.pgh.pa.us (sss.pgh.pa.us [209.114.132.154]) by mail.postgresql.org (8.11.3/8.11.1) with ESMTP id f2SFtlU10923 for ; Wed, 28 Mar 2001 10:55:47 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.3/8.11.3) with ESMTP id f2SFtbw18220; Wed, 28 Mar 2001 10:55:38 -0500 (EST) To: salva@ronincoders.com cc: pgsql-admin@postgresql.org Subject: Re: date_part bug? In-reply-to: <3AC1C228.EBAD97ED@yahoo.com> References: <3AC1C228.EBAD97ED@yahoo.com> Comments: In-reply-to Salvador =?iso-8859-1?Q?Main=E9?= message dated "Wed, 28 Mar 2001 12:51:20 +0200" Date: Wed, 28 Mar 2001 10:55:37 -0500 Message-ID: <18217.985794937@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200103/208 X-Sequence-Number: 1055 Salvador =?iso-8859-1?Q?Main=E9?= writes: > I'm using postgres 7.0.2. When I use date_part('day', date) sometimes I > get wrong values. Ie: > and date_part('day', '1999-3-28')=27 > and date_part('day', '2000-3-26')=25 If those dates are daylight-savings transition days where you live, then this is a known bug (date-to-timestamp conversion is off one hour on such dates). It's fixed for 7.1. regards, tom lane