Re: Improving the names generated for indexes on expressions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Improving the names generated for indexes on expressions
Date: 2025-09-16 12:55:12
Message-ID: 946925.1758027312@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> More generally, maybe map all the various common accessor operators to “.”
> instead of using them directly and capture the constants when chained from
> a column.

That seems fairly useless. You still have a name that requires
double quotes, and you can't tell one operator from another, and
you haven't even saved much space because few operator names are
longer than two or three characters.

(I have thought a little about truncating the contents of Consts
to maybe a dozen bytes for this purpose. Those seem much more
likely to be long...)

More generally, though, I absolutely object to giving the JSON
operators some kind of special privilege in this context.
That's totally not per Postgres style, and besides it's not
solving the problem as a whole, but just this one example.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Core Studios Inc. 2025-09-16 12:55:49 Re: Incorrect result of bitmap heap scan.
Previous Message Core Studios Inc. 2025-09-16 12:47:08 Re: Incorrect result of bitmap heap scan.