X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 333F1D1B4EC for ; Sat, 13 Sep 2003 01:37:21 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 93117-09 for ; Fri, 12 Sep 2003 22:36:53 -0300 (ADT) Received: from web21102.mail.yahoo.com (web21102.mail.yahoo.com [216.136.227.104]) by svr1.postgresql.org (Postfix) with SMTP id A8674D1B505 for ; Fri, 12 Sep 2003 22:36:48 -0300 (ADT) Message-ID: <20030913013652.64956.qmail@web21102.mail.yahoo.com> Received: from [65.206.239.222] by web21102.mail.yahoo.com via HTTP; Fri, 12 Sep 2003 18:36:52 PDT Date: Fri, 12 Sep 2003 18:36:52 -0700 (PDT) From: Shankar K Subject: Re: timestamp with timezone To: Tom Lane Cc: pgsql-admin@postgresql.org In-Reply-To: <434.1063411750@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/226 X-Sequence-Number: 10314 > You mean you want to round off to even seconds? Try > date_trunc, > or cast to "timestamp(0) with time zone". well, i just need to trunc whatever thats after the timestamp i.e from 06/10/2003 12:50:19.188 PDT, i need to remove .188 PDT i'll see if date_trunc helps me or not. thanks for the suggestions tom. >To force stuff to be > rounded when it's stored, declare the column like > that in the > first place. > yeah, i wish the 3rd party apps had 'timestamp without timezone' as the default for all date columns but it isn't :( anyways, reason behind the whole truncating TZ is that, we basically copy the data from postgres to oracle on a nightly batch process for our data warehousing requirements, but oracle upto 8.1.7.x doesn't support timestamp with timezone datatype, so we are kind of stuck with spooling required tables/formating dates to oracle compatible formats and then use sql*loader to upload the data into oracle. not sure how well i can imporve this whole ETL process. Any suggestions are greatly appreciated. Thanks Shankar __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com