Change sqlite3 to PostgreSQL