Search Postgresql Archives

Trigger on transaction?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux