Bug report (with solution) on org.postgresql.jdbc2.EscapedFunctions - Mailing list pgsql-jdbc

From Christophe Janton
Subject Bug report (with solution) on org.postgresql.jdbc2.EscapedFunctions
Date
Msg-id 70cc7f800811050659w2d606775p1e476dd98232ed58@mail.gmail.com
Whole thread Raw
Responses Re: Bug report (with solution) on org.postgresql.jdbc2.EscapedFunctions  (Kris Jurka <books@ejurka.com>)
List pgsql-jdbc
There is a bug on :

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.

Sorry for my English.

Have a nice day.

Christophe JANTON

pgsql-jdbc by date:

Previous
From: Alexander Panzhin
Date:
Subject: Re: Retrieve auto-generated key.
Next
From: "Gopalakrishnan, Mythili"
Date:
Subject: DatabaseMetaData.getTypeInfo()