3 ms·
> 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 f
by zzzeek 14y ago
> 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.