-
美言笑意
发布于 2021-02-02 10:16
-
收藏
PostgreSql 实现的hash_code 函数与java hash_code方法一致CREATE FUNCTION hash_code(text) RETURNS integerLANGUAGE plpgsqlAS$$DECLAREi integer := 0;DECLAREh bigint := 0;BEGINFOR i IN 1..length($1)LOOPh = (h * 31 + ascii(substring($1, ..