pgsql: In transformIndexStmt, transform index expressions in INCLUDING.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: In transformIndexStmt, transform index expressions in INCLUDING.
Date: 2026-07-16 15:56:19
Message-ID: E1wkORe-000TzC-1I@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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 <maaz(dot)adeeb(at)gmail(dot)com>
Author: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Test-authored-by: Maaz Syed Adeeb <maaz(dot)adeeb(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAG+FJqOxYj=sVyHcys64h9DbvzP6EUPGHJ7oKj-PW=Qp5Ebk_g@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(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Masahiko Sawada 2026-07-16 18:53:31 pgsql: Reject infinite and out-of-range interval shifts in uuidv7().
Previous Message Fujii Masao 2026-07-16 15:52:57 pgsql: postgres_fdw: stabilize terminated-connection regression tests