pg_similarity icon indicating copy to clipboard operation
pg_similarity copied to clipboard

Hamming does not support bytea type

Open harvimt opened this issue 12 years ago • 0 comments

Unfortunately there's a) no good way to convert between postgres's bytea type (variable length byte strings) and varbit (variable length bit strings) due to well, read the whole thread here: http://archives.postgresql.org/pgsql-patches/2006-05/msg00041.php

mostly seems to be endianness/arguments that byte strings and bitstrings aren't really the same thing, yadda, yadda,

Anyway, I'm gonna try to write a hamming_bytea function and submit a pull request, but we'll see how far I get before I realize I have no idea what I'm doing. Anyway, looks like you're treating "text" as a bytestring anyway, so I should be able to copy/paste that code somehow, or something, maybe.

harvimt avatar May 06 '12 17:05 harvimt