The cursor class — Psycopg 2.9.3 documentation
www.psycopg.org › docs › cursorThe attribute is -1 in case no execute*() has been performed on the cursor or the row count of the last operation if it can’t be determined by the interface. Note The DB API 2.0 interface reserves to redefine the latter case to have the object return None instead of -1 in future versions of the specification.