[PATCH] Use the multirange schema for its array type name

From: Luca Cappelletti <cappelletti(dot)luca94(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: [PATCH] Use the multirange schema for its array type name
Date: 2026-11-10 18:09:45
Message-ID: CAJbqKXq9MSWPdu+cnJdy2B27NBmQnOXX_Pru7X-XWVR7ftACyA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Creating a PostgreSQL range with `MULTIRANGE_TYPE_NAME` in another schema
can fail with `type "_m" already exists` when that schema contains an
explicit type named `_m`. `DefineRange` checks generated array names in the
range's schema, although the array belongs in the multirange's schema. A
name occupied only in the range's schema can also cause an unnecessary
suffix.

The attached patch uses the multirange's namespace for the name lookup.

The defect is present in the inspected `REL_14_0`, `REL_18_STABLE`, and
`master` sources. Please consider backpatching to affected supported
releases.

Best,
Luca

GitHub: https://github.com/LucaCappelletti94

Attachment Content-Type Size
multirange_patch.patch application/octet-stream 4.8 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Osama Abdul Qader 2026-11-10 18:25:32 Re: Avoid using raw xmin of frozen tuples in logicalrep conflict detection
Previous Message Greg Burd 2026-11-10 17:46:41 Re: nbtree: opt-in leaf key prefix compression