RE: RE: datetime fix - Mailing list pgsql-interfaces

From Peter Mount
Subject RE: RE: datetime fix
Date
Msg-id 1B3D5E532D18D311861A00600865478CF1B46E@exchange1.nt.maidstone.gov.uk
Whole thread Raw
In response to datetime fix  (Ken Kachnowich <khkachn@toad.net>)
List pgsql-interfaces
Comments prefixed by PM: due to using outlook...

-- 
Peter Mount
Enterprise Support Officer, Maidstone Borough Council
Email: petermount@maidstone.gov.uk
WWW: http://www.maidstone.gov.uk
All views expressed within this email are not the views of Maidstone Borough
Council


-----Original Message-----
From: Ken Kachnowich [mailto:khkachn@toad.net]
Sent: Wednesday, October 25, 2000 12:10 AM
To: Cedar Cox; Postgres interfaces
Subject: Re: [INTERFACES] RE: datetime fix


I do a PreparedStatement and setTimestamp() to do the select.
The Timestamp value is converted into a String in the JDBC code.

This may not be a JDBC problem. I can not select by a datetime field
in psql all the time. It seems if the milliseconds are below some
value it works and if above not. .62 worked for me but .71 did not.
I did a copy and paste of the datetime value to get it right:

PM: Now this is really getting weird...

select * from table_a;

| fld1
---------------------------
|2000-10-24 10:15:01.71-04|

select * from table_a where fld1 = '2000-10-24 10:15:01.71';

0 records found 

I had to make a change to the JDBC code to even get the .62 select to
work. The Timestamp toString() method gives a 3 digit millisecond
value and Postgres seems to not want the leading zero (ie: .62 viz
.062).

PM: .62 and .062 should be two different numbers as its being represented as
a decimal second, not as a separate millisecond field.

I will try these with query=1 in pg_options to get the query.

PM: Can you let me know how this is going by Saturday. I'm not going to get
chance to do any work on JDBC before then (apart from replying the odd email
here). Thanks, Peter


pgsql-interfaces by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: signals in ODBC?
Next
From: Thomas Lockhart
Date:
Subject: Re: new maintainer for the ODBC driver?