Re: Bug report (with solution) on org.postgresql.jdbc2.EscapedFunctions

From: Kris Jurka <books(at)ejurka(dot)com>
To: Christophe Janton <christophe(dot)janton(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Bug report (with solution) on org.postgresql.jdbc2.EscapedFunctions
Date: 2008-11-07 09:24:54
Message-ID: Pine.BSO.4.64.0811070423520.8650@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Wed, 5 Nov 2008, Christophe Janton wrote:

> org.postgresql.jdbc2.EscapedFunctions.constantToInterval method.
>
> Value parameter have not to contain an integer. For example : ? a prepared
> statment JDBC parameter
>
> each return of constantToInterval method like :
> *return "'"+value+" day'";*
> must be replaced by :
> *return "CAST(" + value + " || ' day' as interval)";*
>
> This modification required to remove the interval keyword of all method
> using constantToInterval.
>

I'm not sure I fully understand the problem. Can you provide a testcase
to demonstrate the failure?

Kris Jurka

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Gopalakrishnan, Mythili 2008-11-07 14:16:40 Re: DatabaseMetaData.getTypeInfo()
Previous Message Kris Jurka 2008-11-07 09:14:23 Re: DatabaseMetaData.getTypeInfo()