Describe the use case
The issue: #6467 describes the problem with unique naming prepared statements on asyncpg side when using pg bouncer.
To avoid this the asyncpg added an optional name parameter to provide a custom name for prepared statements MagicStack/asyncpg#846.
I suggest populating an optional custom function to generate unique names for prepared statements in Asyncpg Adapter
Databases / Backends / Drivers targeted
Postgresql, asyncpg
Example Use
from uuid import uuid4
engine = create_async_engine(...,
connect_args={
'prepared_statement_name_func': lambda: f'__asyncpg_{uuid4()}__',
},
)
Additional context
No response
Describe the use case
The issue: #6467 describes the problem with unique naming prepared statements on asyncpg side when using pg bouncer.
To avoid this the asyncpg added an optional name parameter to provide a custom name for prepared statements MagicStack/asyncpg#846.
I suggest populating an optional custom function to generate unique names for prepared statements in Asyncpg Adapter
Databases / Backends / Drivers targeted
Postgresql, asyncpg
Example Use
Additional context
No response