| From: | Corey Huinker <corey(dot)huinker(at)gmail(dot)com> |
|---|---|
| To: | Michael Paquier <michael(at)paquier(dot)xyz> |
| Cc: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Tender Wang <tndrwang(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Extended Statistics set/restore/clear functions. |
| Date: | 2026-01-28 08:06:59 |
| Message-ID: | CADkLM=dgvTvuOy+ZOWQX51gGtLgAmQqqZw7Oi74tWrQ542_bvQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Jan 28, 2026 at 1:12 AM Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
wrote:
>
>
>> It seems to me that this comes down to the text[] representation when
>> we read this data from the catalogs, where we can just rely on NULL
>> being in the value, and the official marker in this case:
>> https://www.postgresql.org/docs/current/arrays.html#ARRAYS-INPUT
>
>
> And we're doing a lot of casting ANYARRAY to text throughout this and the
> attribute stats, so that our assurance that we can live without nulls.
>
> Perhaps we have a couple of specific cases where checking for we want
>> some NULL-ness knowledge? It would be less expensive than a full
>> array deconstruction, for sure, especially if the MCVs are large text
>> values.
>>
>
> It's a good theory, or maybe the original coder just assumed that the
> caller of pg_mcv_list() SRF could lateral-unnest the output and keep only
> the interesting columns.
>
> Rebasing and null-rip-out underway.
>
v34
- Now with fewer redundant null structures!
- Changes to the documentation to reflect the fact that the *name
parameters are all text types
| Attachment | Content-Type | Size |
|---|---|---|
| v34-0001-Add-support-for-mcv-in-pg_restore_extended_stats.patch | text/x-patch | 43.6 KB |
| v34-0002-Add-support-for-exprs-in-pg_restore_extended_sta.patch | text/x-patch | 49.2 KB |
| v34-0003-Add-capstone-regression-test-for-pg_restore_exte.patch | text/x-patch | 12.0 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | ji xu | 2026-01-28 08:10:49 | Correction to comment of brin_range_deserialize |
| Previous Message | Pierre Ducroquet | 2026-01-28 07:56:46 | Re: [PATCH] llvmjit: always add the simplifycfg pass |