On Friday 04 August 2006 01:39, John Machin wrote: > Christoph Haas wrote: > > I assume that XQuery can't to weird queries like IP ranges, or can it? > > That's twice now you've indicated that IP ranges are causing you some > problems. What's the big deal? > > (a) If you don't have a specialised data type, just parse an IP address > into an unsigned 32-bit integer so that you can do greater/less-than > tests and masking easily > > (b) handle IP range queries just like you'd do _any_ range query > > Or am I missing something fundamental ?
Honestly I hadn't invested much mental energy into that yet. Telling whether a certain IP address or IP network is part of another IP network was always clear to me as a simple binary AND operation. But at a second thought IP ranges are trivial indeed as a numerical comparison. Thanks for booting my brain. :) Christoph -- http://mail.python.org/mailman/listinfo/python-list