Re: BUG #17883: Segmentation fault when create brin index on user-defined type.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #17883: Segmentation fault when create brin index on user-defined type.
Дата
Msg-id 1372026.1680611902@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #17883: Segmentation fault when create brin index on user-defined type.  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
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



В списке pgsql-bugs по дате отправления:

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17883: Segmentation fault when create brin index on user-defined type.
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17884: gist_page_items() crashes for a non-leaf page of an index with non-key columns