Martha Zimet wrote:
> I am attempting to use PyGreSQL to access a stored procedure in Postgres.
> If I understand correctly, I need to create a cursor and then call the
> cursor's callproc().
I guess it depends on what your stored procedure is returning, and which
pygresql interface you're using. Most of the invocations of stored
procedures that I use (using the pg interface) are of the form:
db.query("SELECT stored_proc('arg1', arg2, ...)")
> I am doing exactly that in my code but keep getting the following exception:
>
> exceptions.AttributeError pgdbCursor instance has no attribute 'callproc'
This looks like pgdb (which I rarely use). I had a quick look at the
pgdbCursor class and doesn't appear to be any callproc() methods, so
the attribute error is accurate. Perhaps you meant
fetchone()/fetchall()/fetchmany()?
--
Regards,
Daryl Tester
"There is no 'I' in team, but there are 6 I's in 'Dissociative Identity
Disorder'"
_______________________________________________
PyGreSQL mailing list
[email protected]
http://mailman.vex.net/mailman/listinfo/pygresql