> > Is there a way to use locks within a trigger? My example below gives the
> > error:
>
>It's not the lock that's the problem I think. The begin work is failing
>because you can't start a transaction inside the function. Were you trying
>to release the lock at the commit in the function?
Yes I was using the commit to release the lock.