Postgres Check Constraint Select