what i means is thread pool issue,  use same thread run several SQL may not 
work on rarely situation. 

maybe when run update statement need use a new connection to make previous 
"SELECT sync_zhprs_custom_word()" take effect?

在2021年11月23日星期二 UTC+8 上午3:20:11<Billy Zheng> 写道:

> In fact, not too many ...  it just 
>
> 1. add a zhparser ts config use pg extension, 
> 2. add a stored generated column column to generate tsvector column (“美元” 
> is not as lexor token)
> 3.  Use following code to add "美元“ as lex token
>      DB.run(Sequel.lit("INSERT INTO zhparser.zhprs_custom_word values(?) 
> ON CONFLICT DO NOTHING;", '美元'))
>      DB.run("SELECT sync_zhprs_custom_word();") # this function i paste 
> before
> 4.  Run update statement to make generated column column get updated 
> automatically. (ruby-pg work, sequel not work)
>
> Sorry, i don't know how to add a alphabet lexor into `english` ts config 
> or whatever to reproduce this issue, maybe can reproduce on that, maybe not.
>
> one more question please, why do you not consider this is a issue relative 
> to thread?
>
> 在2021年11月23日星期二 UTC+8 上午2:59:04<Jeremy Evans> 写道:
>
>> On Mon, Nov 22, 2021 at 10:55 AM Billy Zheng <vil...@gmail.com> wrote:
>>
>>> > I cannot see why the first two would cause a problem, but maybe the 
>>> last one does?  You can turn that off via the :use_iso_date_format=>false 
>>> option when
>>> setting up your Database connection.
>>>
>>> I consider not caused by those option, because following code still not 
>>> work. (after revert above hack in acquire method)
>>>
>>> ```
>>> DB = Sequel.connect(DB_URL, :use_iso_date_format => false, 
>>> :force_standard_strings => false)
>>>
>>> # many code,  ellipsis ...
>>>
>>> DB.run(Sequel.lit("update investing_latest_news set title=title"))
>>>
>>
>> If you avoid the many code, and run DB.run directly after DB = 
>> Sequel.connect, does it work then?
>>
>> Thanks,
>> Jeremy
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sequel-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/503feba8-6000-4449-ab08-297bc4dfcd26n%40googlegroups.com.

Reply via email to