Change sqlite3 to pg