Thread: python - be: Fix build(Stale object helped me miss it), and some bugs in

python - be: Fix build(Stale object helped me miss it), and some bugs in

From
jwp@pgfoundry.org (James William Pye)
Date:
Log Message:
-----------
Fix build(Stale object helped me miss it), and some bugs in Postgres.Query.

Increment the CommandCounter after executing utility statements, so possible
results can be seen. Start making Postgres.Query aware of the transaction that
it was planned in, so as not to die a horrible horrible death if the Query is
reused. Handle exceptions properly in non-SELECT queries. Be sure to fill in
Portal's keywords and returned with a non-NULL PyObj(Py_None), so call_traverse
doesn't croak.

New features:
 prepare method for explicitly re-preparing a Query.
 Cache the raw parse tree(pre-analyze, pre-rewrite).
 Use a memory context to build things in.

It seems to work, but tests should probably be written for it.

Modified Files:
--------------
    be/include/pypg:
        cis.h (r1.2 -> r1.3)
        (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/python/be/include/pypg/cis.h.diff?r1=1.2&r2=1.3)
        query.h (r1.4 -> r1.5)
        (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/python/be/include/pypg/query.h.diff?r1=1.4&r2=1.5)
    be/src:
        module.c (r1.15 -> r1.16)
        (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/python/be/src/module.c.diff?r1=1.15&r2=1.16)
        query.c (r1.6 -> r1.7)
        (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/python/be/src/query.c.diff?r1=1.6&r2=1.7)
    be/src/call:
        portal.c (r1.4 -> r1.5)
        (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/python/be/src/call/portal.c.diff?r1=1.4&r2=1.5)