coredump of language internal function

From: myzhen <zhenmingyang(at)yeah(dot)net>
To: pgsql-bugs(at)postgresql(dot)org
Subject: coredump of language internal function
Date: 2025-09-22 04:56:10
Message-ID: a533370.bb1.1996fc78514.Coremail.zhenmingyang@yeah.net
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

When creating a function using language internal, if the parameters or function attributes of the alias function are different from those of the internal function, they are not checked during creation and may cause a cordump when called.
a example:
CREATE FUNCTION ftest(integer)
RETURNS numeric
AS 'numeric_in'
LANGUAGE internal
PARALLEL SAFE
STRICT
IMMUTABLE;

I didn't find this mentioned in the manual, so I'm not sure if this is a problem, but it seems like it might be better to do a check when creating the function.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2025-09-22 05:05:39 Re: coredump of language internal function
Previous Message Jinhui Lai 2025-09-21 16:05:34 Re: BUG #19059: PostgreSQL fails to evaluate the cheaper expression first, leading to 45X performance degradation