sql - Can a postgres function run alone without needing the client side to wait for a result? -
i know postgresql locks row while doing function because of transaction process. tried trigger function when last row of table unlock.
let's take example:
function_one() , function_two defined inside pg.
my application use function_one() add data or update stuff whatever. when it's done, last row needed unlock , can launch other transaction if want. @ point want postgresql launch function_two() when function_one() done.
thanks answer(s).
edit : more informations
i have tried put trigger on pg catalog did not work because had information needed view , can't trigger data of view.
so release lock need 1 of following commands:
commit; rollback;
so if had code so:
function_one(); commit; function_two();
that looking for. issue chaining functions in such way dictate when lock gets released.
Comments
Post a Comment