From: Japin Li <japinli@hotmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: Coredump with text search dictionary
Date: Tue, 09 Aug 2022 13:31:18 +0800
Message-ID: <MEYP282MB1669D0C84247309AECB592FAB6629@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <774952.1660020771@sss.pgh.pa.us>
References: <MEYP282MB16690107AAF04EBB3B9AADD8B6629@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM>
<774952.1660020771@sss.pgh.pa.us>
On Tue, 09 Aug 2022 at 12:52, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 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.
>
Oh, my bad. I see this in documentation [1].
You must be a superuser to use CREATE TEXT SEARCH TEMPLATE. This restriction
is made because an erroneous text search template definition could confuse
or even crash the server.
However, is there any way to avoid this crash? I'm not familiar with the TS,
I didn't see documentation that describes which function is appropriate for a
TS template init function.
[1] https://www.postgresql.org/docs/devel/sql-createtstemplate.html
--
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: japinli@hotmail.com, tgl@sss.pgh.pa.us
Subject: Re: Coredump with text search dictionary
In-Reply-To: <MEYP282MB1669D0C84247309AECB592FAB6629@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM>
References: <MEYP282MB16690107AAF04EBB3B9AADD8B6629@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM> <774952.1660020771@sss.pgh.pa.us> <MEYP282MB1669D0C84247309AECB592FAB6629@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM>
* 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