Re: Allow to collect statistics on virtual generated columns - Mailing list pgsql-hackers

From Yugo Nagata
Subject Re: Allow to collect statistics on virtual generated columns
Date
Msg-id 20260327021807.3ae563de0a288086b98755fb@sraoss.co.jp
Whole thread Raw
In response to Re: Allow to collect statistics on virtual generated columns  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Responses Re: Allow to collect statistics on virtual generated columns
List pgsql-hackers
On Thu, 26 Mar 2026 16:00:38 +0000
Dean Rasheed <dean.a.rasheed@gmail.com> wrote:

> On Thu, 26 Mar 2026 at 15:09, Yugo Nagata <nagata@sraoss.co.jp> 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.

Regards,
Yugo Nagata

-- 
Yugo Nagata <nagata@sraoss.co.jp>

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: SQL-level pg_datum_image_equal
Next
From: Jim Jones
Date:
Subject: Re: Add XMLNamespaces to XMLElement