Skip to content

Commit

Permalink
s#//#/# in dict path
Browse files Browse the repository at this point in the history
  • Loading branch information
amutu committed Feb 8, 2024
1 parent f9381ab commit a3a1541
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions zhparser--2.1--2.2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ declare
begin
select setting from pg_settings where name='data_directory' into data_dir;

select data_dir || '/base/' || '/zhprs_dict_' || current_database() || '.txt' into dict_path;
select data_dir || '/base/' || '/zhprs_dict_' || current_database() || '.tag' into time_tag_path;
select data_dir || '/base' || '/zhprs_dict_' || current_database() || '.txt' into dict_path;
select data_dir || '/base' || '/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;
Expand Down
4 changes: 2 additions & 2 deletions zhparser--2.2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ declare
begin
select setting from pg_settings where name='data_directory' into data_dir;

select data_dir || '/base/' || '/zhprs_dict_' || current_database() || '.txt' into dict_path;
select data_dir || '/base/' || '/zhprs_dict_' || current_database() || '.tag' into time_tag_path;
select data_dir || '/base' || '/zhprs_dict_' || current_database() || '.txt' into dict_path;
select data_dir || '/base' || '/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;
Expand Down

0 comments on commit a3a1541

Please sign in to comment.