Re: feature request

From: Dave Cramer <Dave(at)micro-automation(dot)net>
To: Jan Blok <jblok(at)profdata(dot)nl>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: feature request
Date: 2002-05-21 01:10:43
Message-ID: 1021943444.16917.122.camel@inspiron.cramers
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Jan,

Well the reason that this is a problem is that the driver has some
"extra" features in it which allow you to store an object into a table
automagically. Specifically the serialization code.

Also, what would you like the driver to do with setObject(n, date) since
there is a setDate(), and a setTimestamp, which should the driver map
to? How do other drivers handle this?

Dave
On Mon, 2002-05-20 at 15:35, Jan Blok wrote:
> Hi
>
> I did find the following:
>
> If I have a table with a timestamp column it is not allowed to do the
> following
>
> Date start_date = new java.util.Date(); //now
> ps4.setObject(2,start_date); //this throws exception "cannot map class
> java.util.Date"
>
> but I have todo:
>
> ps4.setTimestamp(2,new java.sql.Timestamp( start_date.getTime()));
>
> which is ugly in my opinion and other database driver do support this...
> (under the hood every thing is a java.util.Date right? all classes
> java.sql.Date/Time/TimeStamp extend java.util.Date.)
>
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message m.bakirov 2002-05-21 03:42:57 Re: inet datatype question!
Previous Message Dave Cramer 2002-05-21 00:31:17 Re: timestamp exception in driver