Initial commit
Merge Postgres changes into SQLite version