]> git.ipfire.org Git - thirdparty/psycopg.git/commit
fix: improve error message trying to fetch from a no recordset result
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 2 May 2025 22:18:10 +0000 (00:18 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 4 May 2025 15:57:12 +0000 (16:57 +0100)
commit1eb7e5aa85b5350c25abd5f35ad9323aa531ff56
tree6fad844372e00a4329e3285790695d33dea16c4a
parentf6623739a8fcf79c3b96102a8afbe017c1a1251e
fix: improve error message trying to fetch from a no recordset result

Print the last command status with the error. For example:

    the last operation didn't produce records (command status: NOTIFY)

or, if the result doesn't even have a command status:

    the last operation didn't produce records (result status: EMPTY_QUERY)
psycopg/psycopg/_cursor_base.py
tests/test_cursor_common.py
tests/test_cursor_common_async.py