From: Tom Lane <tgl@sss.pgh.pa.us>
To: myzhen <zhenmingyang@yeah.net>
Cc: pgsql-bugs@postgresql.org
Subject: Re: coredump of language internal function
Date: Mon, 22 Sep 2025 01:05:39 -0400
Message-ID: <2811276.1758517539@sss.pgh.pa.us> (raw)
In-Reply-To: <a533370.bb1.1996fc78514.Coremail.zhenmingyang@yeah.net>
References: <a533370.bb1.1996fc78514.Coremail.zhenmingyang@yeah.net>
myzhen <zhenmingyang@yeah.net> writes:
> 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.
We have always considered that this is programmer error.
> 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.
If you have an idea about how such a check could be done, it would
be worth discussing that. But it seems pretty unlikely to me that
there is any portable way to identify externally what data types
a compiled function is expecting to receive.
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, zhenmingyang@yeah.net
Subject: Re: coredump of language internal function
In-Reply-To: <2811276.1758517539@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