Re: Logging duration of batch runs

From: Richard Huxton <dev(at)archonet(dot)com>
To: Christian Kratzer <ck(at)cksoft(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Logging duration of batch runs
Date: 2004-06-23 11:40:46
Message-ID: 40D96C3E.7060007@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Christian Kratzer wrote:
> Hi,
>
> I have a stored procedure run periodically that assign accounting
> records to their respective customers based on username and other criteria.
> It also does all kinds of validation work on the accounting records.
>
> I would have liked to have the procedure log start and stop times using
> RAISE NOTICE and also store start and stop time of each run
> to a logging table.
[snip]
> Is there any way I can get plpgsql to reevaluate now at the end
> of the batch ???

You want timeofday() rather than now(). Note that it returns text rather
than a timestamp.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Milos Prudek 2004-06-23 11:42:12 Re: insert with select as value
Previous Message Martijn van Oosterhout 2004-06-23 11:34:32 Re: Logging duration of batch runs