On Sun, 29 Mar 2026 11:42:47 +0100
Dean Rasheed <[email protected]> wrote:

> On Fri, 27 Mar 2026 at 07:44, Yugo Nagata <[email protected]> wrote:
> >
> > Sorry, I forgot to update the test along with the previous fix.
> > I've attached a revised patch including the updated test.
> >
> 
> I did some more testing of this (things like dependencies, permission
> checks in the selectivity functions, and dump/restore), and everything
> worked as expected.
> 
> The code changes look good. It's nice that it worked out to be quite a
> small, neat patch, and I think it's more-or-less ready for commit,
> though I did find a few minor issues:
> 
> I noted that ALTER TABLE ... SET STATISTICS doesn't work for a virtual
> generated column. I think that's OK, because we don't have statistics
> by default on such columns, and ALTER STATISTICS ... SET STATISTICS
> can be used instead if extended statistics are added. We could perhaps
> relax that restriction in a future patch, but I don't think it's
> necessary right now. However, I do think it's worth documenting the
> limitation, so I'm attaching an update doing that.
> 
> In create_statistics.sgml, there were a number of other things that
> needed updating. Please check the attached updates.
> 
> I found another comment in CreateStatistics() that needed updating,
> and some indentation needed fixing.
> 
> In the regression tests, I reduced the size of the new test table --
> given the recent discussion around how long the tests take to run, we
> don't want to make that worse.
> 
> I also added a couple more simple tests, just to confirm that
> univariate statistics work correctly, and also fixed the test
> statistics "virtual_gen_stats_single_without_less_than", which was
> built on the wrong column.
> 
> If you're happy with those changes, I'll push this.

Thank you for updating the patch. I am fine with that.

One concern is that users might interpret "stored" as referring to
"stored generated columns", rather than including regular columns,
but this might be minor.

Also, the meaning of "automatically" might be a bit unclear, so we
could clarify it by adding "without defining extended statistics."

      Defining extended statistics on a single <emphasis>stored</emphasis>
      column is not supported or necessary, because statistics are built
      automatically on such columns without defining extended statistics.

Regards,
Yugo Nagata

-- 
Yugo Nagata <[email protected]>


Reply via email to