From: | list_usr(at)spacebox(dot)net |
---|---|
To: | Kris Jurka <books(at)ejurka(dot)com> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: Column is of type date but expression is of type text |
Date: | 2010-02-20 01:21:30 |
Message-ID: | 1e11c2271002191721hbce2124r189dbecebe78bcd@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Re: version, good question - I have both postgresql-8.4-701.jdbc3.jar
and postgresql-8.4-701.jdbc4.jar in my Apache Tomcat 5.5 common/lib
directory. Would that cause a problem?
I'm using PostgreSQL 8.4. Java 1.6.
Your example code worked with both jdbc3 and jdbc4, but my code still
isn't working.
I thought it might have to do with the way I instantiate the date, but
I tried that in your example code and it worked fine:
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
birthdate.setTime(format.parse(request.getParameter("birthdate")).getTime());
// getParameter("birthdate") would return "1978-02-13" for example
In my app the PostgreSQL logs show the birthdate parameter as
"1978-02-13 -04:00:00", with the same code in your test program the
time is omitted. Would that make a difference?
On Thu, Feb 18, 2010 at 5:11 PM, Kris Jurka <books(at)ejurka(dot)com> wrote:
>
>
> On Thu, 18 Feb 2010, list_usr(at)spacebox(dot)net wrote:
>
>> Here is the stored procedure in question:
>
> The attached testcase works fine for me. What driver and server versions do
> you have?
>
>>
>> As an aside, how do most people name their IN parameters so as not to
>> have them conflict with actual column names?
>>
>
> Some people prefix them with v_ to indicate that they are variables.
>
> Kris Jurka
From | Date | Subject | |
---|---|---|---|
Next Message | list_usr | 2010-02-20 04:24:56 | Re: Column is of type date but expression is of type text |
Previous Message | Mr Miquel Jordana | 2010-02-19 20:03:08 | auto savepoint in a transaction |