pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Japin Li <japinli@hotmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: Coredump with text search dictionary
Date: Tue, 09 Aug 2022 00:52:51 -0400
Message-ID: <774952.1660020771@sss.pgh.pa.us> (raw)
In-Reply-To: <MEYP282MB16690107AAF04EBB3B9AADD8B6629@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM>
References: <MEYP282MB16690107AAF04EBB3B9AADD8B6629@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM>

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





view thread (6+ messages)  latest in thread

Message-ID: <774952.1660020771@sss.pgh.pa.us>
Permalink:  ../774952.1660020771@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/774952.1660020771@sss.pgh.pa.us

 · 

reply

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, japinli@hotmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: Coredump with text search dictionary
  In-Reply-To: <774952.1660020771@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