You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We observe this issue using the sqlcommenter with the psycopg2 instrumentor. The commenter doesn't support all types of query execution in psycopg2.
Steps to reproduce
cursor.execute(sql.SQL("SELECT 1"))
What is the expected behavior?
Both cursor.execute(sql.SQL("SELECT 1")) or cursor.execute("SELECT 1") should work.
The sqlcommenter should be able to work with the psycopg2.sql.SQL() objects (which is a subclass of psycopg2.sql.Composable) passed into the cursor.execute().
What is the actual behavior? cursor.execute(sql.SQL("SELECT 1")) fails while cursor.execute("SELECT 1") works.
The sqlcommenter assumes that a Python string is passed in, and it will try to call .rstrip() on the query object. In case of a composable that is passed in, it would blow up and eventually caught in the execption.
The text was updated successfully, but these errors were encountered:
We observe this issue using the sqlcommenter with the psycopg2 instrumentor. The commenter doesn't support all types of query execution in psycopg2.
Steps to reproduce
cursor.execute(sql.SQL("SELECT 1"))
What is the expected behavior?
Both
cursor.execute(sql.SQL("SELECT 1"))
orcursor.execute("SELECT 1")
should work.The sqlcommenter should be able to work with the psycopg2.sql.SQL() objects (which is a subclass of psycopg2.sql.Composable) passed into the
cursor.execute()
.What is the actual behavior?
cursor.execute(sql.SQL("SELECT 1"))
fails whilecursor.execute("SELECT 1")
works.The sqlcommenter assumes that a Python
string
is passed in, and it will try to call .rstrip() on the query object. In case of a composable that is passed in, it would blow up and eventually caught in the execption.The text was updated successfully, but these errors were encountered: