mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Add COST and ROWS options to CREATE/ALTER FUNCTION, plus underlying pg_proc
columns procost and prorows, to allow simple user adjustment of the estimated cost of a function call, as well as control of the estimated number of rows returned by a set-returning function. We might eventually wish to extend this to allow function-specific estimation routines, but there seems to be consensus that we should try a simple constant estimate first. In particular this provides a relatively simple way to control the order in which different WHERE clauses are applied in a plan node, which is a Good Thing in view of the fact that the recent EquivalenceClass planner rewrite made that much less predictable than before.
This commit is contained in:
@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/plan/setrefs.c,v 1.127 2007/01/05 22:19:32 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/plan/setrefs.c,v 1.128 2007/01/22 01:35:20 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -83,7 +83,6 @@ static Node *replace_vars_with_subplan_refs(Node *node,
|
||||
static Node *replace_vars_with_subplan_refs_mutator(Node *node,
|
||||
replace_vars_with_subplan_refs_context *context);
|
||||
static bool fix_opfuncids_walker(Node *node, void *context);
|
||||
static void set_sa_opfuncid(ScalarArrayOpExpr *opexpr);
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
@ -1433,7 +1432,7 @@ set_opfuncid(OpExpr *opexpr)
|
||||
* set_sa_opfuncid
|
||||
* As above, for ScalarArrayOpExpr nodes.
|
||||
*/
|
||||
static void
|
||||
void
|
||||
set_sa_opfuncid(ScalarArrayOpExpr *opexpr)
|
||||
{
|
||||
if (opexpr->opfuncid == InvalidOid)
|
||||
|
Reference in New Issue
Block a user