Re: Improving the names generated for indexes on expressions
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: "David G. Johnston" <david.g.johnston@gmail.com>,
"pgsql-hackers@lists.postgresql.org"
<pgsql-hackers@lists.postgresql.org>
Date: 2026-06-04T22:31:24Z
Lists: pgsql-hackers
Attachments
- v3-0001-Improve-the-names-generated-for-indexes-on-expres.patch (text/x-diff) patch v3-0001
[ I was hoping for opinions from more people, but so far it's crickets ] Robert Haas <robertmhaas@gmail.com> writes: > Is this better or worse than deparsing the whole expression to a > string and then smushing sequences of quote-requiring characters down > to a single underscore, as I suggested before? I spent some time trying to parse out why I don't like that suggestion, and eventually realized that it's this: I don't want the behavior of CREATE INDEX to be dependent on every last detail of ruleutils.c. I'm afraid that that'd introduce undesirable cross-version changes in the names selected for indexes. Now, considering this sort of change at all requires an assumption that we can get away with breaking any applications that are sensitive to that. But we only have to assume that we can get away with that once. If we get ruleutils.c involved then I foresee a steady drip drip drip of edge-case naming changes, and I think that will annoy people. In any event, the cfbot has been nagging me that this patch needs a rebase, so here's v3. The only change from v2 is that there are some new test cases in indexing.sql that need adjustment. regards, tom lane
Commits
-
Improve the names generated for indexes on expressions.
- 181b6185c79e master landed