aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlogutils.c
diff options
context:
space:
mode:
authorRichard Guo <rguo@postgresql.org>2025-02-25 16:11:34 +0900
committerRichard Guo <rguo@postgresql.org>2025-02-25 16:11:34 +0900
commit363a6e8c6fcf9f3e19fe673ae02554645974a388 (patch)
tree90c302bc55dcf5765c67f28224c6df113910ca95 /src/backend/access/transam/xlogutils.c
parent1e4351af329f2949c679a215f63c51d663ecd715 (diff)
downloadpostgresql-363a6e8c6fcf9f3e19fe673ae02554645974a388.tar.gz
postgresql-363a6e8c6fcf9f3e19fe673ae02554645974a388.zip
Eliminate code duplication in replace_rte_variables callbacks
The callback functions ReplaceVarsFromTargetList_callback and pullup_replace_vars_callback are both used to replace Vars in an expression tree that reference a particular RTE with items from a targetlist, and they both need to expand whole-tuple references and deal with OLD/NEW RETURNING list Vars. As a result, currently there is significant code duplication between these two functions. This patch introduces a new function, ReplaceVarFromTargetList, to perform the replacement and calls it from both callback functions, thereby eliminating code duplication. Author: Dean Rasheed <dean.a.rasheed@gmail.com> Author: Richard Guo <guofenglinux@gmail.com> Reviewed-by: Jian He <jian.universality@gmail.com> Discussion: https://postgr.es/m/CAEZATCWhr=FM4X5kCPvVs-g2XEk+ceLsNtBK_zZMkqFn9vUjsw@mail.gmail.com
Diffstat (limited to 'src/backend/access/transam/xlogutils.c')
0 files changed, 0 insertions, 0 deletions