In transformIndexStmt, transform index expressions in INCLUDING. Process these just like the adjacent loop for expressions in regular index columns. This logic was originally omitted because there was no intention of supporting index expressions in INCLUDING. There's still no near-term intention of that, but without this change the ChooseIndexExpressionName code added by 181b6185c spits up on expressions in INCLUDING: that expects to handle parse-transformed expressions, and it runs before we reach the place that is currently supposed to throw the "not supported" error. We could fix this problem in other ways, but this way avoids contorting the logic, and it results in less code to be revised not more if we ever get around to supporting INCLUDING expressions.
Reported-by: Maaz Syed Adeeb <[email protected]> Author: Tom Lane <[email protected]> Test-authored-by: Maaz Syed Adeeb <[email protected]> Discussion: https://postgr.es/m/CAG+FJqOxYj=sVyHcys64h9DbvzP6EUPGHJ7oKj-PW=qp5eb...@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/637aa273e6335c2e4d196f510d6787210403ed24 Modified Files -------------- src/backend/parser/parse_utilcmd.c | 20 ++++++++++++++++++++ src/test/regress/expected/index_including.out | 14 ++++++++++++++ src/test/regress/sql/index_including.sql | 9 +++++++++ 3 files changed, 43 insertions(+)
