15 Apr
2015
15 Apr
'15
11:43 a.m.
On 15/04/15 16:19, Arran Cudbard-Bell wrote:
Looking through the PostgreSQL operators I don't think they're any cleaner. They've overloaded shift operators to do their subset/superset stuff.
Well, that's a fairly arbitrary choice that goes back a long way. I suspect they'd use a specific "contains" operator these days, maybe @> for symmetry with the geometric and tsquery types. But you're quite right that Postgres inet/cidr operators have non-obvious edge cases; I use them a lot and still occasionally get bitten. As with many things, explicit is better than implicit magic with anything other than simple datatypes ;o)