| От | Tom Lane |
|---|---|
| Тема | Re: Transaction ID in Triggers |
| Дата | |
| Msg-id | 22497.1250280496@sss.pgh.pa.us обсуждение |
| Ответ на | Transaction ID in Triggers (David Saracini <dsaracini@yahoo.com>) |
| Ответы |
Re: Transaction ID in Triggers
Re: Transaction ID in Triggers |
| Список | pgsql-novice |
David Saracini <dsaracini@yahoo.com> writes:
> Is there a way to find out the current transaction id from within a Trigger? I'm interested in implementing a better
audittrail mechanism and this would help me greatly.
If you have your hands on a row that was inserted or updated by the
current transaction, you could look at its xmin. Another possibility
(in recent releases) is to take the low-order 32 bits of txid_current().
regards, tom lane
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера