Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 8402B476C12; Mon, 2 Dec 2002 14:00:26 -0500 (EST) Received: from temp.joelburton.com (65.eebed1.client.atlantech.net [209.190.238.101]) by postgresql.org (Postfix) with ESMTP id 3FEC1476D49; Mon, 2 Dec 2002 13:38:27 -0500 (EST) Received: by temp.joelburton.com (Postfix, from userid 501) id 1CA0F2BA27; Mon, 2 Dec 2002 13:38:27 -0500 (EST) Date: Mon, 2 Dec 2002 13:38:27 -0500 From: Joel Burton To: Raymond Chui Cc: pgsql-general@postgresql.org, pgsql-sql@postgresql.org, pgsql-admin@postgresql.org Subject: Re: [SQL] CURRENT_TIMSTAMP Message-ID: <20021202183827.GB12953@temp.joelburton.com> References: <3DEB8D3D.5353D375@noaa.gov> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3DEB8D3D.5353D375@noaa.gov> User-Agent: Mutt/1.3.25i X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/10 X-Sequence-Number: 6505 On Mon, Dec 02, 2002 at 11:41:33AM -0500, Raymond Chui wrote: > I created a column, dada type timstamp with time zone > and with default CURRENT_TIMSTAMP > it shows me the default is > > default ('now'::text)::timstamp(6) with time zone > > Then when I insert a row, the default timestamp value is > > yyyy-mm-dd HH:MM:ss.mmmmm+00 > > where mmmmm is milliseconds. > How do I make default only yyyy-mm-dd HH:MM:ss+00 ? > Thank Q! The problem isn't CURRENT_TIMESTAMP, it's your table definition. If you create the field as timestamp(0) [in 7.3, that's timestamp(0) with time zone, since the default has swung to no-TZ], it will keep track of just HMS. Or put in other values for 0 for more granularity on seconds. Of course, you can always store the specific time and select it out w/less resolution (using the time/date functions). In some cases, this might be a better solution. - J. -- Joel BURTON | joel@joelburton.com | joelburton.com | aim: wjoelburton Independent Knowledge Management Consultant