Re: Using timestamp in function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Using timestamp in function
Дата
Msg-id 15686.1096992415@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Using timestamp in function  (Silke Trissl <trissl@informatik.hu-berlin.de>)
Список 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 по дате отправления:

Предыдущее
От: Silke Trissl
Дата:
Сообщение: Using timestamp in function
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: Using timestamp in function