Changed SQLite to PG