Table of Contents

Locking Selects

Postgres and other RDBMSes support SELECT FOR SHARE and SELECT FOR UPDATE, which allow you to lock a row or set of rows in a table with a lock.

These can be enhanced with NOWAIT and SKIP LOCKED.