Re: problems with types after update to 8.0

From: Jason Tesser <jtesser(at)nbbc(dot)edu>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: problems with types after update to 8.0
Date: 2005-06-21 12:56:19
Message-ID: 1119358580.5337.5.camel@jtessermain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

HI

<snip?>
>
> Are you sure the issue is the change from PG7.4=>PG8.0, or have you
> upgraded your jdbc package at the same time?

I have upgraded the driver to the version that matched pg 8.0

> > Here is my prepared statment in my java class
> >
> > private static final String MANUALINSERT =
> > "insert into pactime (datetimein, pacpayperiodlink, wslink,
> > deptlink, commment, type) " +
> > "values ?,?,?,?,?,'man') ";
>
> > and here si the way to fix but there are too many queires to have to
> > change them all.
> >
> > private static final String MANUALINSERT =
> > "insert into pactime (datetimein, pacpayperiodlink, wslink,
> > deptlink, commment, type) " +
> > "values (cast(? as timestamp),?,?,?,?,'man') ";
>
> > here is where I am executing the statement in java
> >
> > stmt = con.prepareStatement(DATEOUTUPDATE);
> > stmt.setString(1, dateout);
> > stmt.setString(2, comment);
> > stmt.setString(3, pactimeid);
>
> Hmm - should this not be something like:
> stmt.setTimestamp(1,dateout) / stmt.setDateTime(1,dateout)

That would be a better :-) way to do it but for now I am just trying to
deal with the code that is there :-)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-06-21 13:11:07 Re: Escape handling in strings
Previous Message Relyea, Mike 2005-06-21 12:50:34 Explain analyze gives no info