| From: | Christian Kratzer <ck-lists(at)cksoft(dot)de> |
|---|---|
| To: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Logging duration of batch runs |
| Date: | 2004-06-23 11:44:40 |
| Message-ID: | 20040623134416.S42702@vesihiisi.cksoft.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Hi,
j
On Wed, 23 Jun 2004, Martijn van Oosterhout wrote:
> On Wed, Jun 23, 2004 at 12:49:19PM +0200, 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>
>
>> the problem is that start_time and stop_time are identical.
>>
>> Is there any way I can get plpgsql to reevaluate now at the end
>> of the batch ???
>
> You want timeofday(), not now(). Now() is transaction time, timeofday()
> is the real current time.
thankx! That did it ...
Greetings
Christian
--
Christian Kratzer ck(at)cksoft(dot)de
CK Software GmbH http://www.cksoft.de/
Phone: +49 7452 889 135 Fax: +49 7452 889 136
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Daniel Verite | 2004-06-23 11:52:28 | Re: psql |
| Previous Message | Milos Prudek | 2004-06-23 11:42:12 | Re: insert with select as value |