Re: Using timestamp in function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Silke Trissl <trissl(at)informatik(dot)hu-berlin(dot)de>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Using timestamp in function
Date: 2004-10-05 16:06:55
Message-ID: 15686.1096992415@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Silke Trissl <trissl(at)informatik(dot)hu-berlin(dot)de> writes:
> I expected, that the variable curtime gets a new time value, each time
> the function is called (at least that is what I understood from the
> documentation). This works fine, if I test it with
> SELECT mylog_test(5, 'test');
> But as soon as I call the funtion from another function (which I need)
> the variable curtime does not change anymore.

"now" refers to the transaction start time. You can get at current time
of day with the timeofday() function.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Fuhr 2004-10-05 16:19:12 Re: Using timestamp in function
Previous Message Silke Trissl 2004-10-05 15:37:51 Using timestamp in function