Hi,
> On Aug 4, 2026, at 07:06, Alexandra Wang <[email protected]> wrote:
>
> For this round I'd most appreciate a thorough review of 0001 and 0002
> to see whether they're committable.
I reviewed 0001 and 0002.
0001 looks good to me as well.
For 0002, in addition to Tomas's comments, I noticed an issue with an
expression that const-folds to a plain column:
```
CREATE TABLE t (a int);
INSERT INTO t SELECT g FROM generate_series(1, 100) g;
CREATE STATISTICS s
ON (CASE WHEN true THEN a END)
FROM t;
ANALYZE t;
```
On v9, the object has `stxkind = {e}`, but `stxdexpr` is NULL and
`pg_stats_ext_exprs` has no row for it. Before 0002, the same definition
produced expression statistics.
Since v9 treats an expression that const-folds to a plain column as that
column, I think this single-entry definition should be rejected, just
like a statistics object defined on a single plain column. Instead, it
is accepted with `stxkind = {e}`, but `ANALYZE` builds no expression
statistics, which seems inconsistent.
--
Best regards,
Chengpeng Yan