Trigger on transaction?

Поиск
Список
Период
Сортировка
От sixtus@gmail.com
Тема Trigger on transaction?
Дата
Msg-id a3229be00704131529i6e88889n6cce6d31f80334b6@mail.gmail.com
обсуждение исходный текст
Список 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

В списке pgsql-general по дате отправления:

Предыдущее
От: Rajarshi Guha
Дата:
Сообщение: indexing array columns
Следующее
От: "Anton Melser"
Дата:
Сообщение: recommendations for reducing mem usage on local dev machine