Port the previous PostgreSQL improvements to SQLite3.