aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/arraysubs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2025-02-11 12:20:05 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2025-02-11 12:20:05 -0500
commita654af21ae522cc8e867e052defd16f76ffaef2e (patch)
tree0fea7fa4a574fbcc72d3d26398fa405544ccfd1c /src/backend/utils/adt/arraysubs.c
parent6a7283dd2f1c573f2cf3daaf14e8a246577da57d (diff)
downloadpostgresql-a654af21ae522cc8e867e052defd16f76ffaef2e.tar.gz
postgresql-a654af21ae522cc8e867e052defd16f76ffaef2e.zip
Preliminary refactoring of plpgsql expression construction.
This short and boring patch simply moves the responsibility for initializing PLpgSQL_expr.target_param into plpgsql parsing, rather than doing it at first execution of the expr as before. This doesn't save anything in terms of runtime, since the work was trivial and done only once per expr anyway. But it makes the info available during parsing, which will be useful for the next step. Likewise set PLpgSQL_expr.func during parsing. According to the comments, this was once impossible; but it's certainly possible since we invented the plpgsql_curr_compile variable. Again, this saves little runtime, but it seems far cleaner conceptually. While at it, I reordered stuff in struct PLpgSQL_expr to make it clearer which fields are filled when, and merged some duplicative code in pl_gram.y. Author: Tom Lane <tgl@sss.pgh.pa.us> Reviewed-by: Andrey Borodin <x4mmm@yandex-team.ru> Reviewed-by: Pavel Borisov <pashkin.elfe@gmail.com> Discussion: https://postgr.es/m/CACxu=vJaKFNsYxooSnW1wEgsAO5u_v1XYBacfVJ14wgJV_PYeg@mail.gmail.com
Diffstat (limited to 'src/backend/utils/adt/arraysubs.c')
0 files changed, 0 insertions, 0 deletions