Skip to content
This repository has been archived by the owner on Jun 11, 2018. It is now read-only.

Postgres instrumentation is incomplete #68

Open
stas opened this issue Sep 24, 2015 · 1 comment
Open

Postgres instrumentation is incomplete #68

stas opened this issue Sep 24, 2015 · 1 comment

Comments

@stas
Copy link

stas commented Sep 24, 2015

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

@roncohen
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants