diff options
| author | Jan UrbaĆski <wulczer@wulczer.org> | 2010-04-11 20:25:17 +0200 |
|---|---|---|
| committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2010-04-20 23:01:01 +0100 |
| commit | c4ebc0f702dfc3bae92ff3ffc01b9d6ed5d2fbde (patch) | |
| tree | 46d8cd7c5875f77c574b63504525b70ec1f2aa92 /psycopg/cursor.h | |
| parent | 249b3ef88fcb57cddf9992175d60c782ee663b25 (diff) | |
| download | psycopg2-c4ebc0f702dfc3bae92ff3ffc01b9d6ed5d2fbde.tar.gz | |
Handle errors in asynchronous queries.
Do it by keeping the reference to the last PGresult in the cursor and
calling pq_fetch() before ending the asynchronous execution. This
takes care of handling the possible error state of the PGresult and
also allows the removal of the needsfetch flag, since now after
execution ends the results are already fetched and parsed.
Diffstat (limited to 'psycopg/cursor.h')
| -rw-r--r-- | psycopg/cursor.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/psycopg/cursor.h b/psycopg/cursor.h index a0a3a82..68a087a 100644 --- a/psycopg/cursor.h +++ b/psycopg/cursor.h @@ -46,7 +46,6 @@ typedef struct { int closed:1; /* 1 if the cursor is closed */ int notuples:1; /* 1 if the command was not a SELECT query */ - int needsfetch:1; /* 1 if a call to pq_fetch is pending */ long int rowcount; /* number of rows affected by last execute */ long int columns; /* number of columns fetched from the db */ |
