pg_result_status() alternative?
Qian Xu
quian.xu at stud.tu-ilmenau.de
Wed Jan 7 07:21:23 EST 2009
Steve Holden wrote:
> Without knowing the full details of that particular module I would
> hazard a guess that any database errors will raise exceptions in Python.
> No exceptions means your database operation worked fine.
result status is not an exception.
It means the information of frontend/backend protocal, after a SQL-statement
is execute.
The following is a list of backend IPC commands (v3)
----------------------------------------------------
Z - Zero / Ready for Query
E - Error Code
A - Notification
P - Cursor Response
B - Binary Row
D - Data, Ascii
C - Complete
G - Copy IN
H - Copy OUT
I - Idle
T - Row Description
V - Function result
For instance:
----------------------------------------------------
SELECT * FROM my_table;
The backend protocal should return T (Row Description) and the frontend
protocal should return Q (Query)
----------------------------------------------------
DROP TABLE my_table;
The backend protocal should return C (Complete) and the frontend protocal
should return Q (Query)
--Qian
More information about the Python-list
mailing list