Re: Does the block of code in a stored procedure execute as a transaction?

Started by Freddy Menjívar M.over 22 years ago2 messagesgeneral
Jump to latest
#1Freddy Menjívar M.
mmfreddy@hotmail.com

NO,
Functions and triggers doesn't start any transaction,
it must be in a upper-level transaction, this since Postgresql
doesn'n support nested transactions.

therefore it is unsafe in multi-user enviroments :(

#2Berend Tober
btober@seaworthysys.com
In reply to: Freddy Menjívar M. (#1)

NO,
Functions and triggers doesn't start any transaction,
it must be in a upper-level transaction, this since Postgresql
doesn'n support nested transactions.

therefore it is unsafe in multi-user enviroments :(

Thank you. But so how can I do this. Can I add a BEGIN TRANSACTION ...
COMMIT block around the call to my sequence-updater procedure inside the
trigger which invokes it?

~Berend Tober