Postgres 生成任意长度随机字符串

create function f_random_str(length INTEGER) returns character varying
LANGUAGE plpgsql
AS $$
DECLARE
result varchar(50);
BEGIN