X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0FB70D1B28B for ; Mon, 12 Jul 2004 10:17:33 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 31923-03 for ; Mon, 12 Jul 2004 13:17:36 +0000 (GMT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id 34F59D1B233 for ; Mon, 12 Jul 2004 10:17:24 -0300 (ADT) Received: (qmail 12365 invoked from network); 12 Jul 2004 13:17:31 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.36?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 12 Jul 2004 13:17:31 -0000 Subject: Re: Timestamp Question From: Dave Cramer Reply-To: pg@fastcrypt.com To: "Dario V. Fassi" Cc: Greg Markham , "pgsql-jdbc@postgresql.org" In-Reply-To: <40F19294.8090700@sistemat.com.ar> References: <40F012E4.3000001@markhamdirect.com> <40F02556.1070109@sistemat.com.ar> <1089552466.11544.311.camel@localhost.localdomain> <40F19294.8090700@sistemat.com.ar> Content-Type: text/plain Organization: Cramer Consulting Message-Id: <1089638275.11544.334.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Mon, 12 Jul 2004 09:17:55 -0400 Content-Transfer-Encoding: 7bit X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/108 X-Sequence-Number: 10492 Dario, Just to give you the big picture, postgresql does not have a company overseeing development, all development is done by volunteers. They primarily work on what is of interest to them. That being said, we gladly accept patches for whatever interests you. In other words you will get further supplying a patch than just saying something doesn't work the way you think it should. As a word of advice, postgresql aims to be SQL compliant, so patches that are not compliant are likely to be refused. As an example, if you wanted some xyz feature "like Oracle does it" for instance it would likely be refused. Dave On Sun, 2004-07-11 at 15:18, Dario V. Fassi wrote: > Dave Cramer wrote: > > >the real question is where do you get microsecond values from in java, > >and are they real? In other words, if you are getting system time in > >microseconds ( if that's even possible ) it will take you a few more > >microseconds to insert it. > > > >Dave > > > > > Dave, it's true that in Java and PC hardware almost microseconds is the > max time discrimination possible. > But re-read my post (and excuse my horrible English), > I say that would help a lot if the microseconds part of a timestamp will > be zero padded to a minimum length of 5 or 6 digits. > > Like: > > "then most databases can take 2004-07-10 12:59:59.123 as 2004-07-10 12:59:59.123000 " > > This behavior help is cross (vendor) database operations . > > Dario. > > >On Sat, 2004-07-10 at 13:20, Dario V. Fassi wrote: > > > > > >>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 > >>> > >>> > >>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. > >> > >> > >> > > > > ---------------------------(end of broadcast)--------------------------- > TIP 8: explain analyze is your friend > > > > !DSPAM:40f192229421573712783! > > -- Dave Cramer 519 939 0336 ICQ # 14675561