postgresql/contrib/pg_stat_statements
Tom Lane a874fe7b4c Refactor the executor's API to support data-modifying CTEs better.
The originally committed patch for modifying CTEs didn't interact well
with EXPLAIN, as noted by myself, and also had corner-case problems with
triggers, as noted by Dean Rasheed.  Those problems show it is really not
practical for ExecutorEnd to call any user-defined code; so split the
cleanup duties out into a new function ExecutorFinish, which must be called
between the last ExecutorRun call and ExecutorEnd.  Some Asserts have been
added to these functions to help verify correct usage.

It is no longer necessary for callers of the executor to call
AfterTriggerBeginQuery/AfterTriggerEndQuery for themselves, as this is now
done by ExecutorStart/ExecutorFinish respectively.  If you really need to
suppress that and do it for yourself, pass EXEC_FLAG_SKIP_TRIGGERS to
ExecutorStart.

Also, refactor portal commit processing to allow for the possibility that
PortalDrop will invoke user-defined code.  I think this is not actually
necessary just yet, since the portal-execution-strategy logic forces any
non-pure-SELECT query to be run to completion before we will consider
committing.  But it seems like good future-proofing.
2011-02-27 13:44:12 -05:00
..
Makefile Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00
pg_stat_statements--1.0.sql Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00
pg_stat_statements--unpackaged--1.0.sql Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00
pg_stat_statements.c Refactor the executor's API to support data-modifying CTEs better. 2011-02-27 13:44:12 -05:00
pg_stat_statements.control Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00