I'm trying to select rows where a value is present in any of a collection of ranges. So far, I've only been able to make the following work:
SELECT * FROM table
WHERE num <@ numrange(1,4) OR num <@ numrange(7,11)
I was hoping I would be able to get something like
SELECT * FROM table
WHERE num <@ ANY(numrange(1,4), numrange(7,11))
working, but I haven't had any luck with it.
Any idea of a better solution than chaining ORs together?