我在做
pg_dump -U bio4d_dba -h host -p 5432 biod6 > database.sql
它正在转储使用$libdir/pgcrypto
的函数(1)和(2)(请参阅下文)以外的所有内容。函数(3)未使用$libdir/pgcrypto
,它已成功导出。我们需要做的转储/导出功能,如(1)和(2)?
(1)
CREATE OR REPLACE FUNCTION bio.decrypt(bytea, bytea, text)
RETURNS bytea
LANGUAGE c
IMMUTABLE PARALLEL SAFE STRICT
AS '$libdir/pgcrypto', $function$pg_decrypt$function$
;
(2)
CREATE OR REPLACE FUNCTION bio.decrypt_iv(bytea, bytea, bytea, text)
RETURNS bytea
LANGUAGE c
IMMUTABLE PARALLEL SAFE STRICT
AS '$libdir/pgcrypto', $function$pg_decrypt_iv$function$
;
(3)
CREATE OR REPLACE FUNCTION bio.decrypt(bytea, bytea)
RETURNS text
LANGUAGE sql
IMMUTABLE STRICT
AS $function$
SELECT convert_from(decrypt($1, $2, 'aes'), 'utf-8')
$function$
;