On 2 Jul 2012, at 16:13, Nico Williams wrote:

> That reminds me: it'd be nice to have a bit string type, since the
> correct way to sort IPv4 CIDR blocks is as bit strings.

        Nice, definitely!

> This is also
> a proper way to sort IPv6 blocks.  Alternatively, it'd be nice to have
> native IP address types in SQLite4, as otherwise one has to jump
> through hoops to handle IP addresses properly.

        Bit strings would be more general.
        Native IP would remove a sometimes-asserted motivation for preferring
        PostgreSQL.

        As I see it, ranges, as well as single addresses and CIDR prefixes, 
        need to be supported, perhaps like the Perl Net::IP module does.

        With some care over the encoding, a natural ordering arises which
        places nested prefixes, ranges, and individual addresses in the
        "right" order.  This would eliminate as much as possible of the
        hoop-jumping.

        I'll try to put together some examples of as illustrations.

        /Niall

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to