]> 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>
Thu, 8 May 2025 21:18:29 +0000 (23:18 +0200)
commita158a5b70a292ecbdd6cc858ef319df279679fdd
tree33dd9bb7663461964f73a4fb6f4e15ce273308be
parent25f1ffd61a21f7073c03a9aa4867c6ddcbbbb995
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