Re: problem with timeofday() function in cvs PostgreSQL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz>
Cc: Dennis Björklund <db(at)zigo(dot)dhs(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: problem with timeofday() function in cvs PostgreSQL
Date: 2003-08-08 15:06:08
Message-ID: 26568.1060355168@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz> writes:
>> You probably want now() instead of that function.

> I can't use now() or others because I need actual time in transaction.

Just cast the result of timeofday() to timestamp (with time zone, likely).

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Eric Anderson Vianet SAO 2003-08-08 15:22:43 unexpected chunk number
Previous Message Christopher Browne 2003-08-08 14:46:58 Re: The database is very slow !