You can. That's effectively what I was doing in my message, except
that you're not seeing it in the messageblk view. You probably don't
want a unique constraint on messageblk, since the idea of the
fingerprint is that it's a 1:1 mapping of the messageblk down to 128
bits.
I agree with you if I had written "UNIQUE (fingerprint)", but my
belief is that the combination of both keys should be unique.
It's redundant.
The fingerprint is going to be unique iff the messageblock is unique.
If that wasn't the case, then there's no point in storing or
calculating it. Unique constraints are generally done with indexes (not
sure about mysql, but it's certainly the case with postgres), so you'd
end up adding the entire messageblk to the index. And it's not a
particularly useful index, since that's the only thing that index would
be good for.
eric