Re: Using timestamp in function - Mailing list pgsql-sql

From Tom Lane
Subject Re: Using timestamp in function
Date
Msg-id 15686.1096992415@sss.pgh.pa.us
Whole thread Raw
In response to Using timestamp in function  (Silke Trissl <trissl@informatik.hu-berlin.de>)
List pgsql-sql
Silke Trissl <trissl@informatik.hu-berlin.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


pgsql-sql by date:

Previous
From: Silke Trissl
Date:
Subject: Using timestamp in function
Next
From: Michael Fuhr
Date:
Subject: Re: Using timestamp in function