DECLARE
varUnlocked boolean;
BEGIN
varUnlocked:=3D pg_try_advisory_lock( 783264760123456 ); -- Try to lock fun=
ction
IF not varUnlocked THEN return NULL; END IF; -- exit if locking is unsucess=
full
WRONG QUERY HERE WHICH INTERRUPT EXECUTION
varUnlocked:=3D pg_advisory_unlock( 783264760123456 ); -- unlock function
END
NEXT time when I run this function I always get NULL until server reboot
EXPECTED: Pg must unlock if function execution failed=