postgresql/contrib/spi
Tom Lane e6faf910d7 Redesign the plancache mechanism for more flexibility and efficiency.
Rewrite plancache.c so that a "cached plan" (which is rather a misnomer
at this point) can support generation of custom, parameter-value-dependent
plans, and can make an intelligent choice between using custom plans and
the traditional generic-plan approach.  The specific choice algorithm
implemented here can probably be improved in future, but this commit is
all about getting the mechanism in place, not the policy.

In addition, restructure the API to greatly reduce the amount of extraneous
data copying needed.  The main compromise needed to make that possible was
to split the initial creation of a CachedPlanSource into two steps.  It's
worth noting in particular that SPI_saveplan is now deprecated in favor of
SPI_keepplan, which accomplishes the same end result with zero data
copying, and no need to then spend even more cycles throwing away the
original SPIPlan.  The risk of long-term memory leaks while manipulating
SPIPlans has also been greatly reduced.  Most of this improvement is based
on use of the recently-added MemoryContextSetParent primitive.
2011-09-16 00:43:52 -04:00
..
autoinc--1.0.sql Avoid use of CREATE OR REPLACE FUNCTION in extension installation files. 2011-02-13 22:54:52 -05:00
autoinc--unpackaged--1.0.sql Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00
autoinc.c Move Trigger and TriggerDesc structs out of rel.h into a new reltrigger.h 2011-07-04 14:35:58 -04:00
autoinc.control Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00
autoinc.example Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
insert_username--1.0.sql Avoid use of CREATE OR REPLACE FUNCTION in extension installation files. 2011-02-13 22:54:52 -05:00
insert_username--unpackaged--1.0.sql Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00
insert_username.c Move Trigger and TriggerDesc structs out of rel.h into a new reltrigger.h 2011-07-04 14:35:58 -04:00
insert_username.control Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00
insert_username.example Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
Makefile Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00
moddatetime--1.0.sql Avoid use of CREATE OR REPLACE FUNCTION in extension installation files. 2011-02-13 22:54:52 -05:00
moddatetime--unpackaged--1.0.sql Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00
moddatetime.c Move Timestamp/Interval typedefs and basic macros into datatype/timestamp.h. 2011-09-09 13:23:41 -04:00
moddatetime.control Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00
moddatetime.example Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
refint--1.0.sql Avoid use of CREATE OR REPLACE FUNCTION in extension installation files. 2011-02-13 22:54:52 -05:00
refint--unpackaged--1.0.sql Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00
refint.c Redesign the plancache mechanism for more flexibility and efficiency. 2011-09-16 00:43:52 -04:00
refint.control Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00
refint.example Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
timetravel--1.0.sql Avoid use of CREATE OR REPLACE FUNCTION in extension installation files. 2011-02-13 22:54:52 -05:00
timetravel--unpackaged--1.0.sql Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00
timetravel.c Redesign the plancache mechanism for more flexibility and efficiency. 2011-09-16 00:43:52 -04:00
timetravel.control Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00
timetravel.example Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00