From: Tom Lane <tgl@sss.pgh.pa.us>
To: linwenbo1994@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17883: Segmentation fault when create brin index on user-defined type.
Date: Tue, 04 Apr 2023 08:38:22 -0400
Message-ID: <1372026.1680611902@sss.pgh.pa.us> (raw)
In-Reply-To: <17883-7bb64f11e60bc1ef@postgresql.org>
References: <17883-7bb64f11e60bc1ef@postgresql.org>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, linwenbo1994@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17883: Segmentation fault when create brin index on user-defined type.
In-Reply-To: <1372026.1680611902@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox