Re: Improving the names generated for indexes on expressions

From: solai v <solai(dot)cdac(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Improving the names generated for indexes on expressions
Date: 2026-06-05 05:37:00
Message-ID: CAF0whue3iOMfoxHX3Smqt_wWHO0U0iuuSSRXeD8Wjb3uSybZXg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

> If people are dead set against double-quoting, I think the only way
> forward is to not include operator names in the generated index names.
> I do not think that's a better way personally, but I seem to be
> outvoted. Here's a v2 that does it like that.
>
> regards, tom lane
I applied the v2 patch and tested it.
The patch applied and built successfully.I tested several expression
indexes(function,operator,JSON,and nested-function expressions).The
generated index names are now more descriptive and make it easier to
identify the indexed expression.
I also ran make check.One regression test (indexing) failed.From the
diff,the failure appears to be due to the regression test still
referencing the old autogenerated index names such as
idxpart_expr_idx,while the patched code now generates names such as
idxpart_a_b_idx.
The manual tests behaved as expected,and the new naming scheme
successfully produces more meaningful and distinguishable index names.
The regression failure appears to be related to outdated test
expectations rather than an issue with the patch functionality itself.

Regards,
Solai

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nisha Moond 2026-06-05 05:42:52 Re: Fix column privileges for pg_subscription.subwalrcvtimeout
Previous Message Michael Paquier 2026-06-05 05:12:31 Re: Heads Up: cirrus-ci is shutting down June 1st