On Thu, Sep 24, 2026 at 1:56 PM Corey Huinker <corey.huinker@gmail.com> wrote:
>
> Here's what I was just about to post to the list, only to see that you already posted something.
>
Hi.
I only took a brief look.
maybe related:
https://git.postgresql.org/cgit/postgresql.git/commit/?id=4edd6036d69ce42ac1af236f659f20daed65c8d4
src/backend/statistics/attribute_stats.c
I wonder in statatt_get_type, can we do:
typcache = lookup_type_cache(*atttypid, TYPECACHE_LT_OPR |
TYPECACHE_EQ_OPR | TYPECACHE_DOMAIN_BASE_INFO);
if (OidIsValid(typcache->domainBaseType))
*atttyptype = get_typtype(typcache->domainBaseType);
else
*atttyptype = typcache->typtype;
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.
--
jian
https://www.enterprisedb.com/