]> granicus.if.org Git - postgresql/commit
Introduce ExecQualAndReset() helper.
authorAndres Freund <andres@anarazel.de>
Mon, 29 Jan 2018 20:16:53 +0000 (12:16 -0800)
committerAndres Freund <andres@anarazel.de>
Mon, 29 Jan 2018 20:19:12 +0000 (12:19 -0800)
commitc12693d8f3bbbffcb79f6af476cc647402e1145e
tree94ea605c5cfd798de9a570fcb5e5cc2c7a9f18a1
parent97d4445a033f1cc02784d42561b52b3441c8eddd
Introduce ExecQualAndReset() helper.

It's a common task to evaluate a qual and reset the corresponding
expression context. Currently that requires storing the result of the
qual eval, resetting the context, and then reacting on the result. As
that's awkward several places only reset the context next time through
a node. That's not great, so introduce a helper that evaluates and
resets.

It's a bit ugly that it currently uses MemoryContextReset() instead of
ResetExprContext(), but that seems easier than reordering all of
executor.h.

Author: Andres Freund
Discussion: https://postgr.es/m/20180109222544.f7loxrunqh3xjl5f@alap3.anarazel.de
src/backend/executor/nodeBitmapHeapscan.c
src/backend/executor/nodeHash.c
src/backend/executor/nodeIndexonlyscan.c
src/backend/executor/nodeIndexscan.c
src/include/executor/executor.h