pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Xavier Poinsard <xpoinsard@free.fr>
Cc: pgsql-jdbc <pgsql-jdbc@postgresql.org>
Subject: Re: Two bugs found (and patch included)
Date: Wed, 19 Jan 2005 10:36:39 +1300
Message-ID: <41ED8167.2030600@opencloud.com> (raw)
In-Reply-To: <41EBD865.20507@free.fr>
References: <41EBD865.20507@free.fr>

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



view thread (4+ messages)  latest in thread

Message-ID: <41ED8167.2030600@opencloud.com>
Permalink:  ../41ED8167.2030600@opencloud.com/
Also on:    postgresql.org/message-id/41ED8167.2030600@opencloud.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: oliver@opencloud.com, xpoinsard@free.fr
  Subject: Re: Two bugs found (and patch included)
  In-Reply-To: <41ED8167.2030600@opencloud.com>
  References: <41EBD865.20507@free.fr> <41ED8167.2030600@opencloud.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox