hamming distance for postgresql