On Sat, May 17, 2008 at 09:30:30AM +0200, Petite Abeille scratched on the wall: > > On May 16, 2008, at 11:07 PM, Igor Tandetnik wrote: > > > Well, for any string A there exists another string B that sorts > > after A. > > How can I guarantee that, after I choose A as my "sorts after > > everything" marker, somebody doesn't put B into the database? > > Well... not to beat a dead horse or anything, but... if one is worried > about the entire range of Unicode data points... one can always use > the highest collation data point as a marker...
And if the highest data point is a "z" (for example), someone could put the string "zz" into the DB that will sort after it. If you use "zz" as the marker, they could put "zzz" in the DB. And so on. The only thing that breaks "for any string A there exists another string B that sorts after A" is the maximum string length. In SQLite that's rather large-- especially to be using as a constant. -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "'People who live in bamboo houses should not throw pandas.' Jesus said that." - "The Ninja", www.AskANinja.com, "Special Delivery 10: Pop!Tech 2006" _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users