Postgres Check Constraint Regex Python