SECURITY UPDATE: type confusion in selectivity estimators.
Any user who can create an operator could attach a selectivity
estimator that assumes particular data types, such as intarray's
_int_matchsel, to an operator on other data types; the planner then
treated a query value as a pointer, so the user could crash the
server and possibly run code in it.
debian/patches/CVE-2026-2004.patch: require superuser to attach a
selectivity estimator that is not built in, make tsmatchsel, the
inet estimators and intarray's _int_matchsel check the data types
they are given, and add the pg_extension OID syscache that the
intarray check needs (upstream 9fa38c572a, ea3bf34986, 7e82d9a04d).
Also fix a statistics cache reference leak in _int_matchsel
(upstream a96b051a98, no CVE).
BEHAVIOUR CHANGE: a non-superuser can no longer CREATE OPERATOR or
ALTER OPERATOR ... SET with a RESTRICT or JOIN estimator that is
not built in, including those of contrib modules such as intarray
and ltree, so restoring a dump that creates such an operator now
fails unless done by a superuser. Superusers, extension scripts
and existing operators are not affected, except that networksel
and networkjoinsel now raise an error when attached to any operator
other than the inet ones.