pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
coredump of language internal function 2+ messages / 2 participants [nested] [flat]
* coredump of language internal function @ 2025-09-22 04:56 myzhen <zhenmingyang@yeah.net> 0 siblings, 1 reply; 2+ messages in thread From: myzhen @ 2025-09-22 04:56 UTC (permalink / raw) To: 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. ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: coredump of language internal function @ 2025-09-22 05:05 Tom Lane <tgl@sss.pgh.pa.us> parent: myzhen <zhenmingyang@yeah.net> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2025-09-22 05:05 UTC (permalink / raw) To: myzhen <zhenmingyang@yeah.net>; +Cc: pgsql-bugs 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 ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-09-22 05:05 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-09-22 04:56 coredump of language internal function myzhen <zhenmingyang@yeah.net> 2025-09-22 05:05 ` Tom Lane <tgl@sss.pgh.pa.us>
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