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
tests: Handle DDL command in cur.sql() differently (#785)
For ease of programming we have a `cur.sql()` method that can be used to
execute any sql command. Fetching rows for DDL statements doesn't work
though, so we were catching that error and ignoring it. [In psycopg
3.2.8 the exact error message was changed][1].
Instead of detecting the new error message, this change makes sure that
we don't trigger this error at all. This is done by detecting whether
our result has rows, before calling `fetchall()`.
Originally reported @Alphaxxxxx in
#784 (comment)
[1]: psycopg/psycopg@1eb7e5a
0 commit comments