Re: Triggers / Procedures - Mailing list pgsql-novice

From Michael Glaesemann
Subject Re: Triggers / Procedures
Date
Msg-id 16709799-F5D0-11D8-831D-000A95C88220@myrealbox.com
Whole thread Raw
In response to Triggers / Procedures  (Steve Tucknott <steve@retsol.co.uk>)
List 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


pgsql-novice by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: MySQL vs PostgreSQL
Next
From: "Marcus Andree S. Magalhaes"
Date:
Subject: sharing temporary tables