Home > Archive > PostgreSQL JDBC > April 2005 > Re: JDBC Driver Modifies Calendar passed into setTimestamp()









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: JDBC Driver Modifies Calendar passed into setTimestamp()
Dave Cramer

2005-04-26, 1:23 pm

I'd suggest that we shouldn't be modifying the calendar object either.

Without looking at the bug, I'd probably agree with him.

dave

Michael Youngstrom wrote:

>There appears to be a possible problem with PreparedStatement's
>
>setTimestamp(int parameterIndex, Timestamp x, Calendar cal)
>
>The Calendar object passed into this method is modified by
>PostgreSQL's JDBC driver. This causes problems with Hibernate. I
>offered a solution for hibernate to clone the calendar before calling
>the method but Gavin King of Hibernate believes it's the JDBC driver's
>problem. Here is the link to the hibernate bug discussed.
>
>http://opensource.atlassian.com/pro.../browse/HHH-405
>
>Mike
>
>---------------------------(end of broadcast)---------------------------
>TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>
>
>
>


--
Dave Cramer
http://www.postgresintl.com
519 939 0336
ICQ#14675561


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Oliver Jowett

2005-04-26, 8:24 pm

Dave Cramer wrote:
> I'd suggest that we shouldn't be modifying the calendar object either.
>
> Without looking at the bug, I'd probably agree with him.


I took a brief look at setTimestamp etc a few weeks ago and they looked
pretty horrible :(

Who's looking after that bit of the code at the moment? It probably
needs an owner at a minimum. (I'd offer to rewrite it, but I have no
time to spend on the driver at the moment..)

-O

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Dave Cramer

2005-04-27, 3:24 am

Oliver,

Not sure anyone is tending to that code at the moment, I'll patch it so
that it doesn't modify the incoming
calendar object.

Oliver Jowett wrote:

>Dave Cramer wrote:
>
>
>
>I took a brief look at setTimestamp etc a few weeks ago and they looked
>pretty horrible :(
>
>Who's looking after that bit of the code at the moment? It probably
>needs an owner at a minimum. (I'd offer to rewrite it, but I have no
>time to spend on the driver at the moment..)
>
>-O
>
>
>
>


--
Dave Cramer
http://www.postgresintl.com
519 939 0336
ICQ#14675561


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com