pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Silke Trissl <trissl@informatik.hu-berlin.de>
Cc: pgsql-sql@postgresql.org
Subject: Re: Using timestamp in function
Date: Tue, 05 Oct 2004 12:06:55 -0400
Message-ID: <15686.1096992415@sss.pgh.pa.us> (raw)
In-Reply-To: <4162BFCF.9090501@informatik.hu-berlin.de>
References: <4162BFCF.9090501@informatik.hu-berlin.de>

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



view thread (3+ messages)  latest in thread

Message-ID: <15686.1096992415@sss.pgh.pa.us>
Permalink:  ../15686.1096992415@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/15686.1096992415@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, trissl@informatik.hu-berlin.de
  Subject: Re: Using timestamp in function
  In-Reply-To: <15686.1096992415@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox