Oliver Jowett <[EMAIL PROTECTED]> writes: > Ok, so something like this? > 1) eval_const_expressions takes a list of parameter values and does > Param to Const replacement if given parameters. > 2) The main planner does not pass parameters to eval_const_expressions. > 3) When the selectivity functions care about a Const vs non-Const value > and they are dealing with a non-leaf expression node, they call > eval_const_expressions passing the expression tree & the planner-global > parameter values, and then look at the result's Const-ness again.
Right. > There appear to be a few other places where Const vs. Param affects the > resulting plan (clause_selectivity, LIMIT/OFFSET support, etc). Do the > same thing there? clause_selectivity could reasonably do this. Not sure about LIMIT/OFFSET. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])