postgresql/src/backend/optimizer/path
Tom Lane 7643bed58e When using extended-query protocol, postpone planning of unnamed statements
until Bind is received, so that actual parameter values are visible to the
planner.  Make use of the parameter values for estimation purposes (but
don't fold them into the actual plan).  This buys back most of the
potential loss of plan quality that ensues from using out-of-line
parameters instead of putting literal values right into the query text.

This patch creates a notion of constant-folding expressions 'for
estimation purposes only', in which case we can be more aggressive than
the normal eval_const_expressions() logic can be.  Right now the only
difference in behavior is inserting bound values for Params, but it will
be interesting to look at other possibilities.  One that we've seen
come up repeatedly is reducing now() and related functions to current
values, so that queries like ... WHERE timestampcol > now() - '1 day'
have some chance of being planned effectively.

Oliver Jowett, with some kibitzing from Tom Lane.
2004-06-11 01:09:22 +00:00
..
Makefile $Header: -> $PostgreSQL Changes ... 2003-11-29 19:52:15 +00:00
allpaths.c Make the world very nearly safe for composite-type columns in tables. 2004-06-05 01:55:05 +00:00
clausesel.c When using extended-query protocol, postpone planning of unnamed statements 2004-06-11 01:09:22 +00:00
costsize.c Adjust cost_nonsequential_access() to have more reasonable behavior 2004-06-10 21:02:00 +00:00
indxpath.c Just about there on de-FastList-ification. 2004-06-01 04:47:46 +00:00
joinpath.c Use the new List API function names throughout the backend, and disable the 2004-05-30 23:40:41 +00:00
joinrels.c Use the new List API function names throughout the backend, and disable the 2004-05-30 23:40:41 +00:00
orindxpath.c Just about there on de-FastList-ification. 2004-06-01 04:47:46 +00:00
pathkeys.c Make the world very nearly safe for composite-type columns in tables. 2004-06-05 01:55:05 +00:00
tidpath.c Use the new List API function names throughout the backend, and disable the 2004-05-30 23:40:41 +00:00