Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

you can assert that "post_id > parent_id", assuming comments are always created subsequent to the creation of their parents (as is the case here) and that integer identifiers are always increasing (otherwise use timestamps). (1, 3) above would indicate an invalid case (not necessarily a cycle, but a precondition for one).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: