Re: examine_variable ignored CollateExpr

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: ZizhuanLiu X-MAN <44973863(at)qq(dot)com>
Cc: jian he <jian(dot)universality(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, tgl <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Guo <rguo(at)postgresql(dot)org>
Subject: Re: examine_variable ignored CollateExpr
Date: 2026-12-03 03:07:20
Message-ID: CAGRkXqSiEvnKFUBQ9KMG_grgd2-yV89P=1vt8CP0ZFCG1c7n9w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

i Zizhuan,

Thanks for v8, and for tracing the varchar case to operator
resolution.

A domain over text or varchar still misses the statistics in WHERE.
With ci from my last mail:

CREATE DOMAIN dt AS text;
CREATE TABLE d (a dt COLLATE "C");
INSERT INTO d SELECT chr(65 + g % 52) FROM generate_series(1, 5200) g;
CREATE STATISTICS ds ON (a COLLATE ci) FROM d;
ANALYZE d;
EXPLAIN ANALYZE SELECT * FROM d WHERE a COLLATE ci = 'a';

This estimates 100 rows for 200 actual.

Thanks,
Shihao

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Bharath Rupireddy 2026-12-03 03:06:45 Re: Use WALReadFromBuffers in more places