Re: now() with microsecond granulity needed

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: now() with microsecond granulity needed
Дата
Msg-id 12975.982688262@sss.pgh.pa.us
обсуждение исходный текст
Ответ на now() with microsecond granulity needed  (Radoslaw Stachowiak <radek@alter.pl>)
Ответы Re: now() with microsecond granulity needed  (Radoslaw Stachowiak <radek@alter.pl>)
Список pgsql-sql
Radoslaw Stachowiak <radek@alter.pl> 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


В списке pgsql-sql по дате отправления:

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Huh? Mysterious Function Error
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Huh? Mysterious Function Error