Re: Implement missing join selectivity estimation for range types

SCHOEMANS Maxime <maxime.schoemans@ulb.be>

From: SCHOEMANS Maxime <maxime.schoemans@ulb.be>
To: Haibo Yan <tristan.yim@gmail.com>
Cc: vignesh C <vignesh21@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Damir Belyalov <dam.bel07@gmail.com>, jian he <jian.universality@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, SAKR Mahmoud <mahmoud.sakr@ulb.be>, Diogo Repas <diogo.repas@gmail.com>, Andrey Lepikhov <a.lepikhov@postgrespro.ru>
Date: 2026-04-16T15:12:56Z
Lists: pgsql-hackers

Attachments

Hi Haibo,

Attached is v7 with the changes we discussed.

Patch 2 now has an inline comment on the && case explaining the
outer-bounds approximation and its consistency with existing restriction
selectivity. The commit message mentions it as well.

Patch 3 uses a separate backend-private header (rangetypes_selfuncs.h)
instead of selfuncs.h.

Regards,
Maxime