opbeat_python icon indicating copy to clipboard operation
opbeat_python copied to clipboard

Postgres instrumentation is incomplete

Open stas opened this issue 10 years ago • 1 comments

The instrumentation is not covering the psycopg2 extensions API. In order to reproduce this, try calling psycopg2.extensions.ISQLQuote.prepare() with the wrapped connection object, it will raise a

 TypeError
must be psycopg2._psycopg.connection, not PGConnectionProxy

An example of such an use-case is when trying to adapt an iterator in an array column type query. To be specific, peewee is using such an adapter: https://github.com/coleifer/peewee/blob/master/playhouse/postgres_ext.py#L109-L117

stas avatar Sep 24 '15 12:09 stas

Hey @stas! Thanks for this. I'll take a look.

roncohen avatar Sep 24 '15 13:09 roncohen