On 05/12/12 21:12, Clemens Ladisch wrote: > Do these queries give the correct result? > > select '100A' collate ipaddress < '127.0.0.1'; > select '100A' collate ipaddress < ' ABCD'; > > I.e., does the collation function actually work?
Thanks for the helpful suggestions. I wish I had thought of something so simple. Here's what I get: sqlite> select '100A' collate ipaddress < '127.0.0.1'; 0 sqlite> select '100A' collate ipaddress < ' ABCD'; 0 sqlite> select '127.0.0.1' collate ipaddress < '::1'; 1 sqlite> select '::1' collate ipaddress = '0::1'; 1 sqlite> select 'dead:beef::' collate ipaddress = 'DEAD:BEEF::'; 1 sqlite> These results match what I intended the collation function to do. It appears to work, including recognizing alternative notations for the same IPv6 address as equivalent. Similar tests using BETWEEN also work as intended. Thanks again. /Niall _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users