"D'Arcy J.M. Cain" <darcy@druid.net> writes:
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> ISTM that what you have here is a bad substitute for using user locks
>> (see contrib/userlock/).
> Perhaps. I assume that the lock is automatically released when the
> holder closes its connection to the database, right? If so then that's
> what I need.
Right, user locks will be dropped automatically at backend exit
(otherwise their management is entirely in your hands).
regards, tom lane