Re: support create index on virtual generated column.

From: ZizhuanLiu X-MAN <44973863(at)qq(dot)com>
To: jian he <jian(dot)universality(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, chengpeng_yan <chengpeng_yan(at)outlook(dot)com>, guofenglinux <guofenglinux(at)gmail(dot)com>, 我自己的邮箱 <44973863(at)qq(dot)com>
Subject: Re: support create index on virtual generated column.
Date: 2026-07-11 14:28:02
Message-ID: tencent_FDF76D24B43F1338DF739626D4DD8DCFF008@qq.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi everyone,

Referring to the regress test feedback from CFBot against the V5 patch, I have reverted
the modifications made to `btcostestimate()`, and revised `genericcostestimate()` as follows:
When `numIndexTuples` gets recalculated within this function, `indexSelectivity` will be
re-estimated based on `index->rel->tuples`, ensuring that `numIndexTuples` and `indexSelectivity`
are mutually consistent.

I have verified the fix against the previously failing regression tests listed by CFBot,
specifically `generated_stored`, `generated_virtual`, `subselect` and `select_parallel`,
and all of them now pass successfully.

regards,
--
ZizhuanLiu (X-MAN) 
44973863(at)qq(dot)com

Attachment Content-Type Size
v6-0001-enhance-index-support-for-virtual-generated-colum.patch application/octet-stream 52.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2026-07-11 14:38:47 Re: for loop variable fixes
Previous Message Andrew Dunstan 2026-07-11 12:43:26 Re: Proposal: new file format for hba/ident/hosts configuration?