| From: | shihao zhong <zhong950419(at)gmail(dot)com> |
|---|---|
| To: | ZizhuanLiu X-MAN <44973863(at)qq(dot)com> |
| Cc: | pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, jian he <jian(dot)universality(at)gmail(dot)com>, tgl <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Guo <rguo(at)postgresql(dot)org> |
| Subject: | Re: examine_variable ignored CollateExpr |
| Date: | 2026-10-11 02:38:56 |
| Message-ID: | CAGRkXqQQZPSPd6MC8iUBoBACLUGe2TAUw7+BO2yRt_J7YcfnmA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Zizhuan,
Thanks for v5. My example is fixed, I get rows=100 again. The
regression tests pass, and I could not measure any change in
planning time for varchar columns.
One more issue
CREATE TABLE t (a text);
INSERT INTO t SELECT chr(65 + g % 52) || g
FROM generate_series(1, 5200) g;
CREATE STATISTICS s ON (left(a, 1) COLLATE "C") FROM t;
ANALYZE t;
EXPLAIN SELECT * FROM t WHERE left(a, 1) = 'A';
On master I get rows=100, with v5 I get rows=26. I think the retry
only runs when the query has the COLLATE, not when only the
statistics expression has it.
v5 also dropped the tests that v1 had. Could you add them back,
with this case and my earlier one?
Thanks,
Shihao
| From | Date | Subject | |
|---|---|---|---|
| Next Message | shihao zhong | 2026-10-11 02:54:31 | Re: [PG19] Wrong results from NOT NULL-based expression simplification |
| Previous Message | shihao zhong | 2026-10-11 02:32:20 | Re: pg_resetwal: refuse to run when backup_label exists |