Re: feature request - Mailing list pgsql-jdbc

From Dave Cramer
Subject Re: feature request
Date
Msg-id 1021943444.16917.122.camel@inspiron.cramers
Whole thread Raw
In response to feature request  ("Jan Blok" <jblok@profdata.nl>)
List 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
>
>




pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: timestamp exception in driver
Next
From:
Date:
Subject: Re: inet datatype question!