diff --git a/MANIFEST.in b/MANIFEST.in index 457004c5..b895628a 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -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 diff --git a/psycopg/cursor_type.c b/psycopg/cursor_type.c index 34e10d57..c660d1d0 100644 --- a/psycopg/cursor_type.c +++ b/psycopg/cursor_type.c @@ -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