Trigger on transaction?

From: sixtus(at)gmail(dot)com
To: pgsql-general(at)postgresql(dot)org
Subject: Trigger on transaction?
Date: 2007-04-13 22:29:08
Message-ID: a3229be00704131529i6e88889n6cce6d31f80334b6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello all,

I've been enjoying programming postgres for a while, but I am stuck
with a problem neither the excellent documentation nor the search on
this mailing list provides with a solution.

It's been asked before, I too would like to have a trigger on transaction!

Use cases:

- I want to version a table which sees multiple updates during one
transaction, but I only need transaction resolution. My solution would
be a trigger on insert/update to copy into a temporary table (where
multiple updates overwrite the old value) and on commit copy into the
version table.

- I would like to have transient data within a persistent table. While
I am in the transaction, the transient information is available, on
commit it is deleted. The only other solution I can think of is a
temporary table inheriting my persistent table. Is that doable? How do
I move a row from parent to child table, will that value drop when the
transaction ends?

Any help greatly appreciated!

Regards,

Hagen

Browse pgsql-general by date

  From Date Subject
Next Message Anton Melser 2007-04-14 11:27:33 recommendations for reducing mem usage on local dev machine
Previous Message Rajarshi Guha 2007-04-13 22:09:50 indexing array columns