1 Apr 2003 22:01
Integrity error
Hi,
It seems v 1.0.15.1 throws Integrity Error even in cases
its not supposed to. For example I noticed it throws it in
cases when we do a selct on a table that doesn't exist.
Previouse in v1.0.10 it used to throw ProgrammingError.
Looking at the code (cursor.c) line 867:
if (asprintf(&errstr, "%s\n%s", pgerr, query) >= 0) {
if (!strncmp(pgerr, "ERROR: Cannot insert a
duplicate key", 37)
|| !strncmp(pgerr, "ERROR: ExecAppend: Fail to
add null", 36)
|| !strstr(pgerr, "referential integrity
violation"))
PyErr_SetString(IntegrityError, errstr);
Shouldn't !strstr be strstr.
Thanks..
Amin
RSS Feed