Re: now() with microsecond granulity needed

From: Radoslaw Stachowiak <radek(at)alter(dot)pl>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: now() with microsecond granulity needed
Date: 2001-02-21 20:54:16
Message-ID: 20010221215416.C1718@blue.alter.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

*** Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> [Tuesday, 20.February.2001, 11:57 -0500]:
> > 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...

Do You mean changing sources and recompiling?
So there is no way of getting more accurate NOW time directly in SQL ?
/DEFAULT clause/ at this moment?

I just have now about 5..10 inserts per second, so in fact even ms would help
me.

--
radoslaw.stachowiak.........................................http://alter.pl/

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Daniel Wickstrom 2001-02-21 20:57:22 Re: now() with microsecond granulity needed
Previous Message Jie Liang 2001-02-21 20:38:02 Re: pl/Perl