PG Bug reporting form <noreply@postgresql.org> writes:
> CREATE OPERATOR CLASS sva_special_ops
> FOR TYPE text using brin
> AS
> OPERATOR 1 <#,
> OPERATOR 2 <=#,
> OPERATOR 3 >=#,
> OPERATOR 4 >#,
> function 1 si_same(text,text);
This is certainly not a valid BRIN operator class definition.
There are four required support functions, not just one, and
I seriously doubt that any of them can usefully be written in
plpgsql. (You also got the set of operators wrong, but that's
not the issue here.) See
https://www.postgresql.org/docs/current/brin-extensibility.html
And yes, invalid operator class definitions can crash the system.
That's why you can't create one unless you're superuser.
regards, tom lane