代码拉取完成,页面将自动刷新
drop function zhprs_getsharepath();
CREATE or REPLACE FUNCTION sync_zhprs_custom_word() RETURNS void LANGUAGE plpgsql AS
$$
declare
database_oid text;
data_dir text;
dict_path text;
time_tag_path text;
query text;
begin
select setting from pg_settings where name='data_directory' into data_dir;
select oid from pg_database where datname=current_database() into database_oid;
select data_dir || '/base/' || database_oid || '/zhprs_dict_' || current_database() || '.txt' into dict_path;
select data_dir || '/base/' || database_oid || '/zhprs_dict_' || current_database() || '.tag' into time_tag_path;
query = 'copy (select word, tf, idf, attr from zhparser.zhprs_custom_word) to ' || chr(39) || dict_path || chr(39) || ' encoding ' || chr(39) || 'utf8' || chr(39) ;
execute query;
query = 'copy (select now()) to ' || chr(39) || time_tag_path || chr(39) ;
execute query;
end;
$$;
select sync_zhprs_custom_word();
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。