from('table').delete(id) (allowing for correct syntax in the deletion).doSomeStuffThatMightFail(id) call? (What would this be?)nextval() but not actually inserting any rows (looks like this will prevent a race condition via the nextval function being atomic), then later (after success) insert the values (can I insert values to a serial field with a value older than the current sequence position? Only the uniqueness of the primary key constraint is required, right?)