Re:Why HN was down
by zzzeek on Monday February 18, 2013 @05:32PM
(#5241206)
> The problem? The database itself had violated its own CHECK constraint on a previous commit, but was enforcing it on all subsequent commits, causing them to fail. Brilliant.
I've never heard of that, and unless you're using a really buggy, broken database, it should not be possible.
> P.s. This was a proprietary database, and when I reported the problem to the vendor
well there you go. I think in practice, a simple CHECK constraint like the one we'd do here (literally, comment_id > parent_comment_id) is pretty easy to put one's faith into.
I've never heard of that, and unless you're using a really buggy, broken database, it should not be possible.
> P.s. This was a proprietary database, and when I reported the problem to the vendor
well there you go. I think in practice, a simple CHECK constraint like the one we'd do here (literally, comment_id > parent_comment_id) is pretty easy to put one's faith into.