Don't search for volatile expr in find_em_expr_usable_for_sorting_rel

Tomas Vondra <tomas.vondra@postgresql.org>

Commit: 9aff4dc01fbb9e126efafd839ae8541362328f1a
Author: Tomas Vondra <tomas.vondra@postgresql.org>
Date: 2020-12-21T19:05:11Z
Releases: 14.0
Don't search for volatile expr in find_em_expr_usable_for_sorting_rel

While prepare_sort_from_pathkeys has to be concerned about matching up
a volatile expression to the proper tlist entry, we don't need to do
that in find_em_expr_usable_for_sorting_rel becausee such a sort will
have to be postponed anyway.

Author: James Coleman
Reviewed-by: Tomas Vondra
Backpatch-through: 13
Discussion: https://postgr.es/m/CAAaqYe8cK3g5CfLC4w7bs%3DhC0mSksZC%3DH5M8LSchj5e5OxpTAg%40mail.gmail.com

Files

PathChange+/−
src/backend/optimizer/path/equivclass.c modified +5 −23

Discussion