Re: Allow to collect statistics on virtual generated columns

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
Cc: Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Allow to collect statistics on virtual generated columns
Date: 2026-03-26 16:00:38
Message-ID: CAEZATCWkQhG0fwz5Z34vn=LcKdCb3DGfomPPwcXL_qtKfEt5+w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Regards,
Dean

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2026-03-26 16:07:41 Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)
Previous Message Yugo Nagata 2026-03-26 15:56:46 Re: Add comments about fire_triggers argument in ri_triggers.c