Re: Timestamp Question

From: "Dario V(dot) Fassi" <software(at)sistemat(dot)com(dot)ar>
To: Greg Markham <gmarkham(at)markhamdirect(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Timestamp Question
Date: 2004-07-10 17:20:22
Message-ID: 40F02556.1070109@sistemat.com.ar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


Greg Markham wrote:

> I have searched the archives and not found and answer to this question:
>
> I am trying to use a Java Timestamp object to create a Postgresql
> Timestamp(6) field. I can insert a Timestamp but it only goes to the
> millisecond(2004-07-10 12:59:59.123) I need it to the microsecond
> (2004-07-10 12:59:59.123456). Is there a way to do this?
>
> - Greg Markham
>
> ---------------------------(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

I have the same problem, and It's very molest in cross-dabase operations
(read in one and write in another vendor db).

A workaround to this problem is create tables using "TIMESTAMP WITHOUT
TIMEZONE", then most databases can take 2004-07-10 12:59:59.123 as
2004-07-10 12:59:59.123000 , but the real value could be 2004-07-10
12:59:59.000123.

I think that If the microseconds come zero padded , simplify many
things, even insert TIMESTAMP WITH TIMEZONE values on other databases
where timestamps is always represented in Local time (without timezone).

Dario Fassi.

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dario V. Fassi 2004-07-10 17:25:21 Re: Error in DatabaseMetaData TableColumn lenght.dec information
Previous Message Tom Lane 2004-07-10 17:07:06 Re: Error in DatabaseMetaData TableColumn lenght.dec