Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

psycopg cursor_factory is overriden by opencensus.ext.postgresql #821

@hectorhdzg

Description

@hectorhdzg

cursor= conn.cursor(cursor_factory=psycopg2.extras.LoggingCursor)
cursor.execute("INSERT INTO test (num, data) VALUES(%s, %s)",(100, "abc'def"))

cursor_factory would be replaced by TraceCursor
https://github.com/census-instrumentation/opencensus-python/blob/master/contrib/opencensus-ext-postgresql/opencensus/ext/postgresql/trace.py#L44

http://initd.org/psycopg/docs/extras.html#connection-and-cursor-subclasses

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions