Change sqlite3 to PG