Postgres And Python Operator Priority In Java