202102-02 PostgreSql 的hash_code函数的用法说明 PostgreSql实现的hash_code函数与javahash_code方法一致CREATEFUNCTIONhash_code(text)RETURNSintegerLANGUAGEplpgsqlAS$$DECLAREiinteger:=0;DECLAREhbigint:=0;BEGINFORiIN1..length($1)LOOPh=(h*31+ascii(substring($1,i,1)))&4294967295;ENDLOOP;RETURNcast(cast(hASbit(32))ASint4);END;$$;补充:PGSQL的某些常用函数一、COALESCE(col,value);COALESCE函数的作用... 继续阅读 >