Use new SQLite 'RETURNING' subclause
SQLite introduced the RETURNING
subclause in 3.35.0 https://www.sqlite.org/releaselog/3_35_0.html. Thus we could use it instead of get_last_rowid()
and would be compatible with PostgreSQL here.
SQLite 3.35 is probably going to land in Ubuntu 21.10. Since SQLite is only used for debug builds / testing, this should be no problem for deployment.