Re: BUG #18705: Segmentation fault when create brin index on user-defined type. - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #18705: Segmentation fault when create brin index on user-defined type.
Date
Msg-id 2448486.1731685634@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #18705: Segmentation fault when create brin index on user-defined type.  (Tomas Vondra <tomas@vondra.me>)
List pgsql-bugs
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



pgsql-bugs by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: BUG #18705: Segmentation fault when create brin index on user-defined type.
Next
From: Tom Lane
Date:
Subject: Re: Today's Postgres Releases break login roles