I just downloaded the source file and build it on my Mac osx 10.6, and it
seems problematic:
  create table tree (
     id        integer primary key,
     parent_id integer references tree,
     data      text,
     path      text        -- materialized path
   );

  -- compute depth of a node
  select *, (length(path) - length( replace(path, '/','' )) +1 ) as depth
from tree;

which returns 5 for a path field "/1/2/5/", shouldn't it be 3?



-- 
Best regards,
Michael Chen
Google Voice Phone.: 847-448-0647
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to