aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/advanced.source
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-05-25 12:55:52 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2021-05-25 12:55:55 -0400
commite30e3fdea873e4e9517c490232ea1d3bcef6c643 (patch)
treec58b97129b8285e60d20c60cf7410f19bebcfcc8 /src/tutorial/advanced.source
parent5e0b1aeb2dfed4f1eb7ac5154c1573885a70db41 (diff)
downloadpostgresql-e30e3fdea873e4e9517c490232ea1d3bcef6c643.tar.gz
postgresql-e30e3fdea873e4e9517c490232ea1d3bcef6c643.zip
Fix use of uninitialized variable in inline_function().
Commit e717a9a18 introduced a code path that bypassed the call of get_expr_result_type, which is not good because we need its rettupdesc result to pass to check_sql_fn_retval. We'd failed to notice right away because the code path in which check_sql_fn_retval uses that argument is fairly hard to reach in this context. It's not impossible though, and in any case inline_function would have no business assuming that check_sql_fn_retval doesn't need that value. To fix, move get_expr_result_type out of the if-block, which in turn requires moving the construction of the dummy FuncExpr out of it. Per report from Ranier Vilela. (I'm bemused by the lack of any compiler complaints...) Discussion: https://postgr.es/m/CAEudQAqBqQpQ3HruWAGU_7WaMJ7tntpk0T8k_dVtNB46DqdBgw@mail.gmail.com
Diffstat (limited to 'src/tutorial/advanced.source')
0 files changed, 0 insertions, 0 deletions