Richard Guo <guofenglinux@gmail.com> writes:
> Alternatively, can we set special_exprkind = EXPR_KIND_ORDER_BY in
> get_rule_orderby? I’m looking for a approach that is parallel to how
> we set special_exprkind = EXPR_KIND_GROUP_BY in get_basic_select_query.
I don't want to do that because it would result in prefixing Vars
within grouping/ordering expressions, which is unnecessary. Only
a bare Var requires this treatment.
regards, tom lane