Richard Guo <guofenglinux(at)gmail(dot)com> writes:
> To be concrete, I mean something like this:
> + /* Update the cost and width fields if we have added any
> new columns. */
> + if (!equal(epq_path->pathtarget->exprs, target->exprs))
> + set_pathtarget_cost_width(root, target);
Wouldn't a list_length() comparison be sufficient? equal() seems
like overkill.
regards, tom lane