public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: [email protected]
Subject: pgsql: Fix oversight in commit 0dca5d68d.
Date: Thu, 03 Apr 2025 20:03:21 +0000
Message-ID: <[email protected]> (raw)

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 <[email protected]>
Author: Tom Lane <[email protected]>
Discussion: https://postgr.es/m/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/dbd437e670b88ca67f6b2477e853412a0e82a8cc

Modified Files
--------------
src/backend/executor/functions.c                  | 15 ++++++++++++++-
src/test/regress/expected/create_function_sql.out | 17 ++++++++++++++++-
src/test/regress/sql/create_function_sql.sql      | 10 ++++++++++
3 files changed, 40 insertions(+), 2 deletions(-)



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: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: pgsql: Fix oversight in commit 0dca5d68d.
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox