Re: Extended Statistics set/restore/clear functions.

From: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
To: Tomas Vondra <tomas(at)vondra(dot)me>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Extended Statistics set/restore/clear functions.
Date: 2025-01-24 05:20:59
Message-ID: CADkLM=dnknZtCgdp2CmRp8gjkau1axYQ7SBMgcj74KgvjQzOwQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
>
> I agree, and I appreciate you working on it.
>

I've tried to incorporate all your feedback:

* duplicates in pg_ndistinct and pg_dependencies now cause the input
function to fail, with tests for each

* all the non-array, non-parametery stuff moved out of import_mcvlist so
that import_mcvlist can move to mcv.c in a sane way

* whitespace issues

* validating attnums inside pg_ndistinct. I held off on doing
pg_dependencies pending feedback on how I handled pg_ndistinct. tests for
invalid positive (attnum isn't involved in the extended stats object), 0
attnum (just wrong) and invalid negative (more than the number of
expressions in the object)

Still to do:

* attnum checking for dependencies, should be simple, once we've locked
down how to do it for pg_ndistinct

* move import_expressions code to expressions.c along with some other
expression-specific stuff.

* more tests, probably

I'd like to merge these down to 3 patches again, but I'm keeping them
separate for this patchset to isolate the attnum-checking code for this
go-round.

Attachment Content-Type Size
v2-0005-Add-attnum-bounds-checking-routines-to-pg_ndistin.patch text/x-patch 3.0 KB
v2-0001-Add-working-input-function-for-pg_ndistinct.patch text/x-patch 11.1 KB
v2-0004-Add-extended-statistics-support-functions.patch text/x-patch 76.8 KB
v2-0002-Add-working-input-function-for-pg_dependencies.patch text/x-patch 14.4 KB
v2-0003-Expose-attribute-statistics-functions-for-use-in-.patch text/x-patch 4.9 KB
v2-0006-Add-pg_ndistinct-attnum-checking-to-extended-stat.patch text/x-patch 8.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2025-01-24 06:22:48 Re: pg_createsubscriber TAP test wrapping makes command options hard to read.
Previous Message vignesh C 2025-01-24 05:06:38 Re: Pgoutput not capturing the generated columns