Feature Request: Declarative Optimistic Locking via ON NO ROWS for UPDATE/DELETE

2025-06-10 Thread Mark Dake
Hi all, I'd like to propose a declarative syntax addition for UPDATE and DELETE that supports optimistic locking directly in SQL: an ON NO ROWS clause that triggers an error if no rows are affected by the DML statement. Problem In many applications, particularly those using optimistic conc

Inconsistent Behavior in JSONB Numeric Array Deletion

2025-06-10 Thread Mark Dake
Hi all, I'd like to report what I believe is an inconsistency in the behavior of the jsonb - operator when applied to numeric arrays. Problem PostgreSQL allows us to check for the presence of a scalar inside a JSONB array: SELECT jsonb('[2,3,1]') @> to_jsonb(1); -- Returns true Ho