Is there a recommended "postgres way" to determine if a certain row is locked... without blocking?

In my custom postgres client app I'd like to be able to determine if another user is "modifying" a given record. If so, I would present a dialog to the user such as "Record Locked. Sam Smith is already modifying this record. Try again later."

I've looked at SELECT FOR UPDATE which looks good except for that it blocks. I don't want my UI to freeze up... I just want to notify the user that it's locked and move on. Any thoughts?

Thanks.



---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org

Reply via email to