Re: Coredump with text search dictionary - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Coredump with text search dictionary
Date
Msg-id 774952.1660020771@sss.pgh.pa.us
Whole thread Raw
In response to Coredump with text search dictionary  (Japin Li <japinli@hotmail.com>)
Responses Re: Coredump with text search dictionary  (Japin Li <japinli@hotmail.com>)
List pgsql-bugs
Japin Li <japinli@hotmail.com> writes:
> When attempting use text search, here is a core dump
> (reported from my friend, Song Jinzhou).

> CREATE TEXT SEARCH TEMPLATE public.my_ts_template (
>   init = varchar_support,
>   lexize = dispell_lexize
> );

> CREATE TEXT SEARCH DICTIONARY public.my_ts_dict (
>   template = public.my_ts_template
> );


There's a reason why CREATE TEXT SEARCH TEMPLATE is superuser-only:
it's on you to supply valid parameters.  varchar_support is a
completely inappropriate choice for a TS template init function.
The proposed patch doesn't add any meaningful amount of safety
(just add some options to the dictionary, and it'll still crash).
Moreover, the patch breaks init functions that would, say, want
to insist that option X be provided.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Japin Li
Date:
Subject: Coredump with text search dictionary
Next
From: Japin Li
Date:
Subject: Re: Coredump with text search dictionary