Received: from localhost (uranus.hub.org [200.46.204.60]) by postgresql.org (Postfix) with ESMTP id 2553E9FA4C5 for ; Fri, 10 Nov 2006 18:28:01 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.60]) (amavisd-new, port 10024) with ESMTP id 59758-09 for ; Fri, 10 Nov 2006 18:27:59 -0400 (AST) X-Greylist: delayed 01:29:35.839687 by SQLgrey- Received: from ihemail4.lucent.com (ihemail4.lucent.com [135.245.0.39]) by postgresql.org (Postfix) with ESMTP id 72EC09F9F79 for ; Fri, 10 Nov 2006 18:27:57 -0400 (AST) Received: from ilexp02.ndc.lucent.com (h135-3-39-2.lucent.com [135.3.39.2]) by ihemail4.lucent.com (8.13.8/IER-o) with ESMTP id kAAMRsfX029542; Fri, 10 Nov 2006 16:27:54 -0600 (CST) Received: from ILEXC2U01.ndc.lucent.com ([135.3.39.9]) by ilexp02.ndc.lucent.com with Microsoft SMTPSVC(6.0.3790.0); Fri, 10 Nov 2006 16:27:53 -0600 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C70517.76822740" Subject: Re: help with front/backend datatype converting Date: Fri, 10 Nov 2006 16:27:52 -0600 Message-ID: In-Reply-To: <5366BF7A-226B-443C-97A6-7AAE5F603BA2@fastcrypt.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [JDBC] help with front/backend datatype converting Thread-Index: AccFDVwayxKvlVE5QjmRaKQAoLs9VAACUKlA From: "Do, Leon \(Leon\)" To: "Dave Cramer" Cc: X-OriginalArrivalTime: 10 Nov 2006 22:27:53.0815 (UTC) FILETIME=[76C1D670:01C70517] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/57 X-Sequence-Number: 16099 This is a multi-part message in MIME format. ------_=_NextPart_001_01C70517.76822740 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable =20 Dave, =20 I see you raised a lot of issues about this problem but I don't have any suggestion as of now. I'll think about it. =20 On the side, the timezone for timestamp is always sending in this format: 2006-11-10 14:36:19.213000 -0500 =20 should it be 2006-11-10 14:36:19.213000 -05:00 =20 with the colon between hour and min? =20 thanks again =20 Leon Do =20 =20 =20 =20 =20 ________________________________ From: Dave Cramer [mailto:pg@fastcrypt.com]=20 Sent: Friday, November 10, 2006 4:15 PM To: Do, Leon (Leon) Cc: pgsql-jdbc@postgresql.org Subject: Re: [JDBC] help with front/backend datatype converting =20 Hi Leon, =20 No, currently there is no way to do this. It is possible, but this is probably the worst data type to try this with. Postgresql has two timestamp types, 1 with timezone, 1 without, jdbc has no knowledge of this. Do you have suggestions on how to resolve this ? Also consider the actual timezone, what if the timezone of the server is different than the timezone of the client. To add to the problem, it is possible for the server to keep dates/timestamps as 64bit integers, or Floating point values. The client has to send the data in exactly the right format. =20 Sorry to only outline the problems without constructive solutions. =20 Dave =20 On 10-Nov-06, at 3:58 PM, Do, Leon (Leon) wrote: Hi, =20 It looks like PostgreSQL JDBC always converting a column value to text before sending it to the Backend server. Is there a way to stop this behavior? =20 I am using the following piece of code to set the timestamp value: =20 new prepstmt.setBinaryStream(1,is,bdata.); java.sql.Timestamp sqltime =3D =20 =20 When the backend server receives the parse message, the oid type for binary data is set but the oid type for timestamp is not set. When the bind message arrives, the format type for binary data is binary and the format type for timestamp is text and there is no way to know what is the type of the value anymore. Can I configure to disable text converting feature? thanks =20 =20 Leon Do Lucent Technologies Mobility Software Engineer =20 =20 =20 ------_=_NextPart_001_01C70517.76822740 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

 

Dave,

 

I see you raised a lot of issues = about this problem but I don’t have any suggestion as of now.  = I’ll think about it.

 

On the side, the timezone for = timestamp is always sending in this format:

2006-11-10 14:36:19.213000 -0500

 

should = it be

2006-11-10 14:36:19.213000 -05:00

 

with = the colon between hour and min?

 

thanks = again

 

Leon Do

 

 

 

 

 


From: Dave = Cramer [mailto:pg@fastcrypt.com]
Sent: Friday, November = 10, 2006 4:15 PM
To: Do, Leon (Leon)
Cc: = pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] help = with front/backend datatype converting

 

Hi Leon,

 

No, currently there is no way to do this. It is possible, but = this is probably the worst data type to try this with. Postgresql has two = timestamp types, 1 with timezone, 1 without, jdbc has no knowledge of this. Do you = have suggestions on how to resolve this ? Also consider the actual timezone, = what if the timezone of the server is different than the timezone of the client. = To add to the problem, it is possible for the server to keep dates/timestamps = as 64bit integers, or Floating point values. The client has to send the data in = exactly the right format.

 

Sorry to only outline the problems without constructive = solutions.

 

Dave

 

On 10-Nov-06, at 3:58 PM, Do, Leon = (Leon) wrote:



Hi,

 

It looks like = PostgreSQL JDBC always converting a column value to text before sending it to the = Backend server.  Is there a way to stop this behavior? 

I am using the = following piece of code to set the timestamp value:

 

new

prepstmt.setBinaryStream(1,is,bdata.);         &= nbsp;      java.sql.Timestamp sqltime =3D =  

 

When the backend server receives the parse message, the oid type for binary = data is set but the oid type for timestamp is not set.When the bind message arrives, the format type for binary data is binary and = the format type for timestamp is text and there is no way to know what is = the type of the value anymore.   Can I configure to disable text = converting feature?thanks 

 

Leon Do

Lucent Technologies

Mobility Software Engineer

  



 

------_=_NextPart_001_01C70517.76822740--