PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> Creating a BRIN operator class with a support function that has a wrong
> signature (e.g. accepting text instead of internal) succeeds at DDL time,
> but crashes the server when a BRIN index using that opclass is created.
This is not a Postgres bug. The reason that opclass creation is
restricted to superusers is that the system trusts opclasses to
behave according to spec. We'd check that rather than just assume it
if it were practical to do so, but it's not really (see the halting
problem for starters).
We could close a small fraction of the possible crash causes by
improving assignProcTypes, but that would be a feature improvement
not a bug fix.
regards, tom lane