我在密码编码方面遇到了一些问题,应该如何处理。编码类型是md5
digest(data text, type text) returns bytea;
CREATE OR REPLACE FUNCTION md(bytea) returns text AS $$
SELECT encode(digest($1, 'sha1'), 'md5')
$$ LANGUAGE SQL STRICT IMMUTABLE;
INSERT INTO "login"(login, password, employee_id)
VALUES ( 'email',crypt('password', md('md5')), 1);
*** 错误*
ERROR: syntax error at or near "digest"
SQL state: 42601
Character: 1