pg_statistic MCVs use float4 but extended stats use float8

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Cc: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
Subject: pg_statistic MCVs use float4 but extended stats use float8
Date: 2023-02-15 01:20:46
Message-ID: 20230215012046.GO1653@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

It seems odd that stats_ext uses double:

postgres=# SELECT attrelid::regclass, attname, atttypid::regtype, relkind FROM pg_attribute a JOIN pg_class c ON c.oid=a.attrelid WHERE attname='most_common_freqs';
attrelid | attname | atttypid | relkind
--------------------+-------------------+--------------------+---------
pg_stats | most_common_freqs | real[] | v
pg_stats_ext | most_common_freqs | double precision[] | v
pg_stats_ext_exprs | most_common_freqs | real[] | v

I'm not sure if that's deliberate ?

This patch changes extended stats to match.

--
Justin

Attachment Content-Type Size
0001-WIP-mcv.c-use-float4-for-mcv-frequencies.patch text/x-diff 5.8 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2023-02-15 01:26:41 Re: Use pg_pwritev_with_retry() instead of write() in dir_open_for_write() to avoid partial writes?
Previous Message Tatsuo Ishii 2023-02-15 01:14:54 Re: make_ctags: use -I option to ignore pg_node_attr macro