Re: Explicit deterministic COLLATE fails with pattern matching operations on column with non-deterministic collation

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: James Lucas <jlucasdba@gmail.com>, "David G. Johnston" <david.g.johnston@gmail.com>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2020-06-05T01:22:01Z
Lists: pgsql-bugs

Attachments

I wrote:
> 3. Hack things up so that the core code renames all these exposed
> functions to, say, ineq_histogram_selectivity_ext() and so on,
> allowing the additional arguments to exist, but the old names would
> still be there as ABI compatibility wrappers.

Here's a proposed v12 patch along those lines.

			regards, tom lane

Commits

  1. Improve ineq_histogram_selectivity's behavior for non-default orderings.

  2. Use query collation, not column's collation, while examining statistics.

  3. Make pg_statistic and related code account more honestly for collations.