Postgres Array Comparison Python Interpreter