Skip site navigation (1) Skip section navigation (2)

Re: Triggers / Procedures

From: Michael Glaesemann <grzm(at)myrealbox(dot)com>
To: Steve Tucknott <steve(at)retsol(dot)co(dot)uk>
Cc: PostGreSQL <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Triggers / Procedures
Date: 2004-08-24 13:18:28
Message-ID: 16709799-F5D0-11D8-831D-000A95C88220@myrealbox.com (view raw or flat)
Thread:
Lists: pgsql-novice
On Aug 24, 2004, at 9:21 PM, Steve Tucknott wrote:

>  PostGreSql 7.4.3
>
>  I have a function that 'audits' inserts / updates on other tables - I 
> have put timetraps in the code to see why it takes so long. The 
> problem is that the timetrap shows a common time although the lapse in 
> the display of the time is 5 to 6 seconds. How can I see what is 
> actually going on?

<snip />

>         SELECT CURRENT_TIMESTAMP INTO l_timeStamp;
>            RAISE NOTICE '(%) INserted (%) 
> (%)',l_timeStamp,TG_ARGV[1],TG_ARGV[0]; 

current_timestamp is evaluated once for the transaction. To see "wall 
clock" time, use timeofday() (which, FYI, returns a text string rather 
than a timestamp value). For more information,
<http://www.postgresql.org/docs/current/static/functions-datetime.html>

Michael Glaesemann
grzm myrealbox com


In response to

pgsql-novice by date

Next:From: Marcus Andree S. MagalhaesDate: 2004-08-24 13:56:08
Subject: sharing temporary tables
Previous:From: Scott MarloweDate: 2004-08-24 12:54:04
Subject: Re: MySQL vs PostgreSQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group