Simplified the code and docs, and rewrote the example with more prose instead of PL/pgSQL, which unfortunately made it longer, although it could be truncated. Not really sure what's best...
v5-0001-Refactor-GetLockConflicts-into-more-general-GetLo.patch
Description: Binary data
v5-0003-Add-WAIT-FOR-LOCKERS-command.patch
Description: Binary data
v5-0002-Allow-specifying-single-lockmode-in-WaitForLocker.patch
Description: Binary data