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 20260324230110.8be302935c6792e77cd86a75@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>)
List pgsql-hackers
On Tue, 24 Mar 2026 11:43:47 +0000
Dean Rasheed <dean.a.rasheed@gmail.com> wrote:

> On Tue, 24 Mar 2026 at 10:57, Yugo Nagata <nagata@sraoss.co.jp> wrote:
> >
> > One concern is that CREATE STATISTICS does not allow creating extended
> > statistics on a single colmun. If we try this, it raises the following error:
> >
> >  ERROR:  extended statistics require at least 2 columns
> >
> > Therefore, if we take this approach, we would need to add an exception
> > to this rule for virtual columns.
> 
> I think that would be fine. It makes sense because a virtual column
> expands to an expression, and we already allow CREATE STATISTICS on a
> single expression.

I see, that makes sense. I'll update the patch accordingly.

Regards,
Yugo Nagata

> 
> Regards,
> Dean


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



pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: Eliminating SPI / SQL from some RI triggers - take 3
Next
From: Japin Li
Date:
Subject: Re: log_checkpoints: count WAL segment creations from all processes