pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: myzhen <zhenmingyang@yeah.net>
To: pgsql-bugs@postgresql.org
Subject: coredump of language internal function
Date: Mon, 22 Sep 2025 12:56:10 +0800 (CST)
Message-ID: <a533370.bb1.1996fc78514.Coremail.zhenmingyang@yeah.net> (raw)

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.

view thread (2+ messages)  latest in thread

Message-ID: <a533370.bb1.1996fc78514.Coremail.zhenmingyang@yeah.net>
Permalink:  ../a533370.bb1.1996fc78514.Coremail.zhenmingyang@yeah.net/
Also on:    postgresql.org/message-id/a533370.bb1.1996fc78514.Coremail.zhenmingyang@yeah.net

 · 

reply

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: zhenmingyang@yeah.net
  Subject: Re: coredump of language internal function
  In-Reply-To: <a533370.bb1.1996fc78514.Coremail.zhenmingyang@yeah.net>

* 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