Re: [SQL] Using timestamp in function

2004-10-05 Thread Michael Fuhr
On Tue, Oct 05, 2004 at 05:37:51PM +0200, Silke Trissl wrote: > CREATE or replace FUNCTION mylog_test(integer, varchar) RETURNS > timestamp AS ' > DECLARE > n ALIAS FOR $1; > logtxt ALIAS FOR $2; > curtime timestamp; > BEGIN > curtime := ''now''; >

Re: [SQL] Using timestamp in function

2004-10-05 Thread Tom Lane
Silke Trissl <[EMAIL PROTECTED]> 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