Fix oversight in commit 0dca5d68d.
Tom Lane <tgl@sss.pgh.pa.us>
Fix oversight in commit 0dca5d68d. As coded, fmgr_sql() would get an assertion failure for a SQL function that has an empty body and is declared to return some type other than VOID. Typically you'd never get that far because fmgr_sql_validator() would reject such a definition (I suspect that's how come I managed to miss the bug). But if check_function_bodies is off or the function is polymorphic, the validation check wouldn't get made. Reported-by: Alexander Lakhin <exclusion@gmail.com> Author: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/0fde377a-3870-4d18-946a-ce008ee5bb88@gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/executor/functions.c | modified | +14 −1 |
| src/test/regress/expected/create_function_sql.out | modified | +16 −1 |
| src/test/regress/sql/create_function_sql.sql | modified | +10 −0 |
Discussion
- SQLFunctionCache and generic plans 49 messages · 2023-02-07 → 2025-04-09