From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tomas Vondra <tomas@vondra.me>
Cc: Tender Wang <tndrwang@gmail.com>
Cc: 503699317@qq.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18705: Segmentation fault when create brin index on user-defined type.
Date: Fri, 15 Nov 2024 10:47:14 -0500
Message-ID: <2448486.1731685634@sss.pgh.pa.us> (raw)
In-Reply-To: <e47f0a40-f778-4165-90fb-3fa1be786234@vondra.me>
References: <18705-29cc90ff31682f19@postgresql.org>
<ec61c89f-6d2a-46b0-9746-4646ef7c5060@vondra.me>
<CAHewXNnmBt7xzwhUY1HMQ8Ck=W5T9XJWpQj3qPPhgZcQjBPwNg@mail.gmail.com>
<e47f0a40-f778-4165-90fb-3fa1be786234@vondra.me>
Tomas Vondra <tomas@vondra.me> writes:
> On 11/15/24 07:17, Tender Wang wrote:
>> Can we report errors not crash if users pass an unexpected function?
Read up on the halting problem.
> I think it might be improved to do some checks, yes. The CREATE OPERATOR
> CLASS should be able to signatures of the functions - it's AM-specific,
> and there's a limit how much can be checked. For example these functions
> have "internal" arguments, which can be an arbitrary pointer.
We already have amvalidate, which would certainly have caught anything
as egregiously wrong as this example. I do not remember why that's
not a forced step of CREATE OPERATOR CLASS, but I'm sure there
was a good reason for making it separate.
regards, tom lane
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, tomas@vondra.me, tndrwang@gmail.com, 503699317@qq.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18705: Segmentation fault when create brin index on user-defined type.
In-Reply-To: <2448486.1731685634@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