| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | linwenbo1994(at)gmail(dot)com |
| Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: BUG #17883: Segmentation fault when create brin index on user-defined type. |
| Date: | 2023-04-04 12:38:22 |
| Message-ID: | 1372026.1680611902@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
PG Bug reporting form <noreply(at)postgresql(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | PG Bug reporting form | 2023-04-04 13:00:01 | BUG #17884: gist_page_items() crashes for a non-leaf page of an index with non-key columns |
| Previous Message | PG Bug reporting form | 2023-04-04 05:51:56 | BUG #17883: Segmentation fault when create brin index on user-defined type. |