Re: Row pattern recognition

From: Henson Choi <assam258(at)gmail(dot)com>
To: jian he <jian(dot)universality(at)gmail(dot)com>, Tatsuo Ishii <ishii(at)postgresql(dot)org>
Cc: zsolt(dot)parragi(at)percona(dot)com, sjjang112233(at)gmail(dot)com, vik(at)postgresfriends(dot)org, er(at)xs4all(dot)nl, jacob(dot)champion(at)enterprisedb(dot)com, david(dot)g(dot)johnston(at)gmail(dot)com, peter(at)eisentraut(dot)org, li(dot)evan(dot)chao(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Row pattern recognition
Date: 2026-12-01 08:06:08
Message-ID: CAAAe_zDGphQBp1znn-0hQYYLEp4iuFxXc6LuDOcVSj-Ps_WZYQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Jian,

> Overall, i think in eval_const_expressions_mutator, we do below should
> be enough.
>
> + case T_RPRNavExpr:
> [...]

The case is not needed for that. A node without a case in
eval_const_expressions_mutator() goes to ece_generic_processing(),
which copies the node and const-simplifies its subexpressions, so
RPRNavExpr is already folded the same way.

A case for T_RPRNavExpr would be needed only to remove a navigation
operation where that is possible, as PREV(x, 0) can become x; there are
a few more such cases. If x has become a constant by one of the paths
in my increment mail, such as pull-up, the expression above it can then
be folded as well, which is where the real gain would be.

Best regards,
Henson

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhijie Hou 2026-12-01 08:12:47 Re: Preserve conflict log table during upgrade
Previous Message Henson Choi 2026-12-01 07:45:46 Re: Row pattern recognition