a extension for postgresql refer to smlar
it suitable for postgresql9.5.0 and there are four function: twoint(integer,integer) ------------just two integer distance; two_float(float,float) ------------just two float distance; similarity(text,text): ----------compute two text similarity arraysml(anyarray,anyarray): -----------compute two array.