The test database that lied · figure 2
Same tests, new judge
The suite still executes on SQLite. What changed is who gets to rule on the lock shape.
before one path — the lock shape is never checked
lock statementcarries FOR UPDATE intentwith_for_update_if_supportedon SQLite — strips FOR UPDATEexecute on SQLite
green — lock shape never checked
after the same statement forks — execution unchanged, shape judged by Postgres
lock statementthe same statement
unchanged
with_for_update_if_supportedon SQLite — strips FOR UPDATEexecute on SQLite
new
compile against
assert_pg_lock_compatible
monkeypatch get_dialect_name → "postgresql"compile against
postgresql.dialect()
build fails
if
FOR UPDATE is combined with
aggregateGROUP BYHAVINGDISTINCTset operationwindow function