Skip to content

Feature request: 'get_attributes' without prepared statements #837

Closed
@nikitagashkov

Description

@nikitagashkov

Hello!

Right now I'm trying out the AsyncSession in the [email protected] which uses asyncpg under the hood and as it turns out that specific configuration does not work well with pgbouncer even if you disable statement caching both in asyncpg and SQLAlchemy.

As discussed in the corresponding issue — sqlalchemy/sqlalchemy#6467SQLAlchemy uses Connection.prepare() regardless of user's decision on whether or not to use prepared statements. It is required to fetch the query attributes.

It looks like if there would be an ability to fetch attributes of the query without preparing it first, the issue could be mitigated. Therefore, I wanted to ask if there is a way to fetch those attributes without calling Connection.prepare() first?

cc @zzzeek

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions