On Thu, Sep 24, 2026 at 02:44:19PM +0800, jian he wrote:
> Similar in import_pg_statistic.
> change to
> typcache = lookup_type_cache(typid, TYPECACHE_LT_OPR |
> TYPECACHE_EQ_OPR | TYPECACHE_DOMAIN_BASE_INFO);
>
> Disclaimer: Since I saw both of you actively working on this issue, I
> haven't tried this myself.
Yes, I was wondering about that a bit, feeding a single typcache entry
across the board. And while looking at the code, I was reminded about
the following exceptions:
extended_stats_funcs.c: if (typid == TSVECTOROID)
stat_utils.c: if (*atttypid == TSVECTOROID)
stat_utils.c: if (atttypid == TSVECTOROID)
I think that the existing code is also broken when defining a domain
over tsvector if we don't feed a domain base type in these three
spots.
--
Michael