Received: from sss.pgh.pa.us (sss.pgh.pa.us [209.114.132.154]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1KGxAx29821 for ; Tue, 20 Feb 2001 11:59:11 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.1/8.11.1) with ESMTP id f1KGvg912978; Tue, 20 Feb 2001 11:57:42 -0500 (EST) To: Radoslaw Stachowiak cc: pgsql-sql@postgresql.org Subject: Re: now() with microsecond granulity needed In-reply-to: <20010220173146.E1718@blue.alter.pl> References: <20010220173146.E1718@blue.alter.pl> Comments: In-reply-to Radoslaw Stachowiak message dated "Tue, 20 Feb 2001 17:31:46 +0100" Date: Tue, 20 Feb 2001 11:57:42 -0500 Message-ID: <12975.982688262@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200102/312 X-Sequence-Number: 1508 Radoslaw Stachowiak writes: > using now() to init TIMESTAMP fields I got resolution of one second. How > can I define DEFAULT in column (TIMESTAMP type) to get higher > time-resolution (TIMESTAMP supports microseconds). You could make a variant of now() that relies on gettimeofday() instead of time(). Note that you probably won't get microsecond precision in any case... regards, tom lane