.callproc() patch from Moshe (support for result sets.)

This commit is contained in:
Federico Di Gregorio 2006-10-03 05:54:22 +00:00
parent 3381b0362b
commit d189203f9f
2 changed files with 3 additions and 2 deletions

View File

@ -2,6 +2,7 @@ recursive-include psycopg *.c *.h
recursive-include lib *.py
recursive-include tests *.py
recursive-include ZPsycopgDA *.py *.gif *.dtml
recursive-include psycopg2da *
recursive-include examples *.py somehackers.jpg whereareyou.jpg
recursive-include debian *
recursive-include doc TODO HACKING SUCCESS ChangeLog-1.x async.txt

View File

@ -896,11 +896,11 @@ psyco_curs_callproc(cursorObject *self, PyObject *args, PyObject *kwargs)
}
/* allocate some memory, build the SQL and create a PyString from it */
sl = strlen(procname) + 10 + nparameters*3 - (nparameters ? 1 : 0);
sl = strlen(procname) + 17 + nparameters*3 - (nparameters ? 1 : 0);
sql = (char*)PyMem_Malloc(sl);
if (sql == NULL) return NULL;
sprintf(sql, "SELECT %s(", procname);
sprintf(sql, "SELECT * FROM %s(", procname);
for(i=0; i<nparameters; i++) {
strcat(sql, "%s,");
}