pghammer icon indicating copy to clipboard operation
pghammer copied to clipboard

hamming distance fn for postgresql

= Hamming distance function for PostgreSQL

Computes the hamming distance for 2 64bit unsigned integers.

== Requirements

  • PostgreSQL Server development libraries. (debian: postgresql-server-dev-9.0 e.g.)
  • pg_config in PATH.
  • GNU C compiler.
  • GNU make.

== Installing

PSQL_DB= make install

== Example

select hamming_distance(4, 3); #=> 3

= License

{CC BY-SA 3.0}[http://creativecommons.org/licenses/by-sa/3.0/]