Don't allow composite type to be member of itself via multirange

Heikki Linnakangas <heikki.linnakangas@iki.fi>

Commit: 06e304524d5c19223697a78ffaa8c7610bc6a365
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2026-04-23T18:33:02Z
Releases: 16.14
Don't allow composite type to be member of itself via multirange

CheckAttributeType() checks that a composite type is not made a member
of itself with ALTER TABLE ADD COLUMN or ALTER TYPE ADD ATTRIBUTE,
even indirectly via a domain, array, another composite type or a range
type. But it missed checking for multiranges. That was a simple
oversight when multiranges were added.

Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://www.postgresql.org/message-id/93ce56cd-02a6-4db1-8224-c8999372facc@iki.fi
Backpatch-through: 14

Files

Discussion