Minor Changes
-
#255
e48bb83Thanks @baseballyama! - feat: addno-locking-subquery-with-limitrule (recommended:error)Flags
UPDATE/DELETEstatements whoseIN (...),EXISTS (...)or
scalar sub-SELECTcarries both a row-locking clause andLIMIT/OFFSET.
PostgreSQL re-executes such a sub-SELECTfor every candidate row, and each
re-execution skips the rows the statement already modified — so the limit
stops bounding how many rows are modified and the statement can touch the
whole table (PostgreSQL BUG #15715). Move the sub-SELECTinto aWITH
clause, which PostgreSQL evaluates exactly once.