Skip to content

Glossary: PostgreSQL Beyond the Basics

FOR UPDATE

Also written: SELECT ... FOR UPDATE

A SELECT clause that locks the rows it returns, so other writers wait for your transaction. It is used to avoid lost updates and, with SKIP LOCKED, to build work queues.

Where the book teaches it

Related terms

SKIP LOCKED, NOWAITLost update