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

Transactions within Function

From: Steve Horn <steve(at)stevehorn(dot)cc>
To: pgsql-novice(at)postgresql(dot)org
Subject: Transactions within Function
Date: 2012-04-04 16:07:06
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
I have a very basic function that performs several steps. Each one of these
steps could take a significant amount of time which I would like to track.

To do this I am inserting a record to a logging table with a timestamp.
After my function runs, all of my log entries have the exact same
timestamp. I am assuming this is because they are all being committed in
the same transaction.

Is there a way I can commit those log inserts in real time?

Steve Horn


pgsql-novice by date

Next:From: Andy ChambersDate: 2012-04-04 16:17:53
Subject: Re: Transactions within Function
Previous:From: Tom LaneDate: 2012-04-04 13:53:28
Subject: Re: Function returning SETOF returns nothing

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