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
multirange_patch.patch
Description: Binary data
