Yep, we get asked to do that quite often. Use statement_timeout before
the LOCK command. If the timeout happens, the LOCK, and hence
transaction will abort.
---
The Hermit Hacker wrote:
>
> Simple (I think) question ... i
Simple (I think) question ... is there a way of having an application
attempt to acquire a LOCK on a table *without* it blocking? Right now, if
you try to LOCK a table that another process has LOCKed, it will hang
indefinitely waiting for the other LOCK to drop ... is there a way of
setting a 'ti