Using `LASTVAL()` wasn't working 100% of the time for some reason after inserting and deleting some rows. So we're using `RETURNING` instead.
Using `LASTVAL()` wasn't working 100% of the time for some reason after inserting and deleting some rows. So we're using `RETURNING` instead.