public inbox for [email protected]  
help / color / mirror / Atom feed
From: Dean Rasheed <[email protected]>
To: Yugo Nagata <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: [email protected]
Subject: Re: Allow to collect statistics on virtual generated columns
Date: Thu, 26 Mar 2026 17:44:01 +0000
Message-ID: <CAEZATCV5ZbGZzmqKPow9tsaVuE3vmTU4WwEq0wHrsM=QHBpUEQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<kp43uuykq64fyqxnlihq2rzntarextvzibuzturajfucl6bayo@6fcnflboemtt>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<CAEZATCV6=q0-5HFBMg4jFS-j1ZCwANhp1sLXBQZYsK2ZLwq0AQ@mail.gmail.com>
	<[email protected]>
	<CAEZATCUR5B=6M7H2bwRU0_6FrbSE8yHe_+9bTbRUdU=jE33yog@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<CAEZATCWkQhG0fwz5Z34vn=LcKdCb3DGfomPPwcXL_qtKfEt5+w@mail.gmail.com>
	<[email protected]>

On Thu, 26 Mar 2026 at 17:18, Yugo Nagata <[email protected]> wrote:
>
> On Thu, 26 Mar 2026 16:00:38 +0000
> Dean Rasheed <[email protected]> wrote:
>
> > On Thu, 26 Mar 2026 at 15:09, Yugo Nagata <[email protected]> wrote:
> > >
> > > I've attached an updated patch including the documentation and tests.
> >
> > I think this is a much better approach.
> >
> > One thing that stands out in CreateStatistics() is that the check for
> > a less-than operator can be skipped if there is just a single virtual
> > generated column, for the same reason as for statistics on a single
> > expression. I.e., it should be possible to build statistics on a
> > single virtual generated column of any data type.
>
> I've attached a revised patch to skip the less-than operator check
> for a single virtual generated column.
>
> In fact, this change skips the check for any single column,
> not just virtual generated columns. However, using a non-virtual
> single column will result in an error elsewhere.

Makes sense. I think the comments could just be simplified to say
"Disallow data types without a less-than operator in multivariate
statistics", and add the word "multivariate" to the error message, as
in the expression case.

Regards,
Dean





view thread (21+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Allow to collect statistics on virtual generated columns
  In-Reply-To: <CAEZATCV5ZbGZzmqKPow9tsaVuE3vmTU4WwEq0wHrsM=QHBpUEQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox