Received: from rush.u-netsys.com.br (rush.u-netsys.com.br [200.192.48.10]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f0G1DI024565 for ; Mon, 15 Jan 2001 20:13:18 -0500 (EST) (envelope-from rdg@viafractal.com.br) Received: (qmail 25042 invoked from network); 16 Jan 2001 01:13:07 -0000 Received: from ppp25-pm3.u-netsys.com.br (HELO viafractal.com.br) (200.192.49.154) by rush.u-netsys.com.br with SMTP; 16 Jan 2001 01:13:07 -0000 Message-ID: <3A63A1B1.D0918005@viafractal.com.br> Date: Mon, 15 Jan 2001 23:19:45 -0200 From: Renato De Giovanni X-Mailer: Mozilla 4.72 [en] (Win95; I) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: Querying date interval References: <3A63070C.F2661FED@viafractal.com.br> <25500.979571694@sss.pgh.pa.us> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Archive-Number: 200101/153 X-Sequence-Number: 814 > > create table testdate (field1 date); > > insert into testdate values ('2000-09-30'); > > insert into testdate values ('2000-10-20'); > > insert into testdate values ('2000-11-25'); > > select * from testdate where field1 between '2000-10-01' and > > '2000-11-30' ; > > > field1 > > ------------ > > 2000-09-30 <---- why is it here?? > > 2000-10-20 > > 2000-11-25 > > (3 rows) > > Curious. I can't reproduce this error in EST5EDT timezone, using > either 7.0.2 or current. > > What PG version are you using, and with what timezone setting? > Is 2000-09-30 or 2000-10-01 a daylight-savings transition date in your > timezone? I'm using 7.0.2 version on debian 2.2. Standard timezone here is GMT-3, but we´re currently in DST since 8 Oct 2000. Never changed datestyle setting - I'm only using ISO8601 notation to manipulate values. And now I've noticed something even weird - leaving psql interface and entering it again, that query show me the right result! But if I drop the table, create the same structure with the same data then I get wrong result again!? Well, anyway, I'll try upgrading to 7.0.3... -- Renato Sao Paulo - SP - Brasil rdg@viafractal.com.br