Re: Extended Statistics set/restore/clear functions. - Mailing list pgsql-hackers

From Corey Huinker
Subject Re: Extended Statistics set/restore/clear functions.
Date
Msg-id CADkLM=fky861BrifcuWc0CbWfo3yMbRB+m1jG4qqXG_3hnqdtA@mail.gmail.com
Whole thread Raw
In response to Re: Extended Statistics set/restore/clear functions.  (jian he <jian.universality@gmail.com>)
Responses Re: Extended Statistics set/restore/clear functions.
List pgsql-hackers
On Thu, Nov 13, 2025 at 2:02 AM jian he <jian.universality@gmail.com> wrote:
hi.

v12-0001 and v12-0002 overall look good to me.

        if (dependency->nattributes <= 1)
            elog(ERROR, "invalid zero-length nattributes array in
MVDependencies");
This is an unlikely-to-happen error message,  but still, “nattributes”
seems confusing?

Agreed the error message should be changed if it's kept at all. That error may never occur now that we test for empty arrays in the array close event handler. So maybe this becomes a plain assert().


similarly, in doc/src/sgml/perform.sgml, I think the query should be:

SELECT stxkeys AS k, jsonb_pretty(stxdndistinct::text::jsonb) AS nd
  FROM pg_statistic_ext join pg_statistic_ext_data on (oid = stxoid)
  WHERE stxname = 'stts2'    \gx

The example almost certainly predates \gx, so that's a good suggestion.

pgsql-hackers by date:

Previous
From: "Joel Jacobson"
Date:
Subject: Re: Optimize LISTEN/NOTIFY
Next
From: Chao Li
Date:
Subject: Re: Suggestion to add --continue-client-on-abort option to pgbench