pgsql: Don't create a shell type for a function returning SETOF

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Don't create a shell type for a function returning SETOF
Date: 2026-11-18 15:14:35
Message-ID: E1xThMp-00000000Fm1-029s@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Don't create a shell type for a function returning SETOF

Commit 2866d8c7db tightened the rules for when CREATE FUNCTION creates
a shell type. Tighten some more, to not create a shell type for
functions returning SETOF either, for similar reasons. Backpatch to
all supported versions, like commit 2866d8c7db (v14 is no longer
supported however).

Author: Ewan Young <kdbase(dot)hack(at)gmail(dot)com>
Discussion: https://www.postgresql.org/message-id/CAON2xHN8y=9KeFnEb4KAKPvVks5VQaMUFJSGTv3T9VY777EKRw@mail.gmail.com
Backpatch-through: 15

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/6099030d8ca29ef0a4f7502038fc3c8d88045557

Modified Files
--------------
src/backend/commands/functioncmds.c | 3 ++-
src/test/regress/expected/create_type.out | 6 ++++++
src/test/regress/sql/create_type.sql | 6 ++++++
3 files changed, 14 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2026-11-18 15:14:36 pgsql: Don't create a shell type for a function returning SETOF
Previous Message Heikki Linnakangas 2026-11-18 14:25:13 pgsql: Silence unused-but-set-variable warnings with MEMORY_CONTEXT_CHE