X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id F2DB73A2BCC for ; Tue, 18 Jan 2005 21:36:51 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 74120-05 for ; Tue, 18 Jan 2005 21:36:47 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id 73BD33A2BB9 for ; Tue, 18 Jan 2005 21:36:47 +0000 (GMT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.20]) by yass.opencloud.co.nz with asmtp (Exim 3.35 #1 (Debian)) id 1Cr11m-0006ed-00; Wed, 19 Jan 2005 10:36:42 +1300 Message-ID: <41ED8167.2030600@opencloud.com> Date: Wed, 19 Jan 2005 10:36:39 +1300 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0 (X11/20041228) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Xavier Poinsard Cc: pgsql-jdbc Subject: Re: Two bugs found (and patch included) References: <41EBD865.20507@free.fr> In-Reply-To: <41EBD865.20507@free.fr> X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.002 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/183 X-Sequence-Number: 12063 Xavier Poinsard wrote: > I just discovered two bugs and attached a patch to correct them : > > - the jdbc escaped scalar function dayofweek should return values > between 1 and 7 (1 for sunday) unlike the backend "extract dow" function > > - the literal escaped values for date/time/timestamp were not explicitly > casted and causing some problems : for example > extract( dow from '2005-01-17 12:00:00') > generate an error, but the following is accepted > extract( dow from TIMESTAMP '2005-01-17 12:00:00') Applied. Thanks for the report & patch. While testing this patch I noticed we have existing date-related regression failures (not related to the patch) against 7.2.x: > [junit] Testcase: testSetTimestampWTZ(org.postgresql.test.jdbc2.TimestampTest): Caused an ERROR > [junit] ERROR: Bad timestamp external representation '2000-02-08 04:00:00.120000+1300' > [junit] org.postgresql.util.PSQLException: ERROR: Bad timestamp external representation '2000-02-08 04:00:00.120000+1300' ... > [junit] at org.postgresql.test.jdbc2.TimestampTest.testSetTimestampWTZ(TimestampTest.java:100) > [junit] Testcase: testSetTimestampWOTZ(org.postgresql.test.jdbc2.TimestampTest): Caused an ERROR > [junit] ERROR: Bad timestamp external representation '2000-02-07 15:00:00.120000+1300' > [junit] org.postgresql.util.PSQLException: ERROR: Bad timestamp external representation '2000-02-07 15:00:00.120000+1300' ... > [junit] at org.postgresql.test.jdbc2.TimestampTest.testSetTimestampWOTZ(TimestampTest.java:210) Is it worth fixing this? -O