> 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"))
```
在2021年11月23日星期二 UTC+8 上午2:35:43<Jeremy Evans> 写道:

> On Mon, Nov 22, 2021 at 10:27 AM Billy Zheng <[email protected]> wrote:
>
>> Hi, Jeremy, after do some research, i can reproduce same (expected) 
>> behavior as ruby-pg gem.
>>
>> I add one code like this, i guess it means always create a new thread to 
>> run following SQL statement.
>>
>> sequel-5.50.0/lib/sequel/connection_pool/threaded.rb:139
>>
>>   def acquire(thread)
>>     + return make_new(:default)
>>
>> Now,  when run "DB.run(Sequel.lit("update investing_latest_news set 
>> title=title"))", it works now.
>>
>
> That may help identify the problem, but that isn't a solution.  That looks 
> like it will leak connections.
>
> Looks like the actual cause of the problem may be due to some connection 
> state that Sequel uses.  By default, Sequel issues the following 
> initialization SQL queries on each PostgreSQL connection:
>
>  SET standard_conforming_strings = ON
> SET client_min_messages = 'WARNING'
> SET DateStyle = 'ISO'
>
> 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.
>
> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/0e050472-1a0f-4eaa-b5c1-fc0f2e55c600n%40googlegroups.com.

Reply via email to