您可以
statement_timeout通过中的
options参数
libpq来设置配置值。您可以
psycopg2在
connect调用中访问此参数。您可以通过参数将其他参数传递
connect给SQLAlchemy的调用
connect_args。因此,将它们放在一起:
engine = create_engine(..., connect_args={"options": "-c statement_timeout=1000"})
您可以
statement_timeout通过中的
options参数
libpq来设置配置值。您可以
psycopg2在
connect调用中访问此参数。您可以通过参数将其他参数传递
connect给SQLAlchemy的调用
connect_args。因此,将它们放在一起:
engine = create_engine(..., connect_args={"options": "-c statement_timeout=1000"})