public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Robert Haas <[email protected]>
Cc: [email protected]
Subject: Re: ALTER TYPE OWNER fails to recurse to multirange
Date: Tue, 16 Jan 2024 11:46:45 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+Tgmob2Ku6Mnk=4Z8iLqNXra8NmX+t9EmED5Hy+DZR+81UqUQ@mail.gmail.com>
References: <[email protected]>
<CA+TgmoZZFj_XQi9_nJ7f-6jQk=-m+Ki9RTAehBWf9E21bVmS+Q@mail.gmail.com>
<[email protected]>
<CA+Tgmob2Ku6Mnk=4Z8iLqNXra8NmX+t9EmED5Hy+DZR+81UqUQ@mail.gmail.com>
Robert Haas <[email protected]> writes:
> On Mon, Jan 15, 2024 at 2:28 PM Tom Lane <[email protected]> wrote:
>> I'm reasoning by analogy to array types, which are automatically
>> created and automatically updated to keep the same ownership
>> etc. properties as their base type. To the extent that multirange
>> types don't act exactly like that, I say it's a bug/oversight in the
>> multirange patch. So I think this is a backend bug, not a pg_dump
>> bug.
> Well, I guess maybe I'm just clueless. I thought that the range and
> multirange were two essentially independent objects being created by
> the same command. But I haven't studied the implementation so maybe
> I'm completely wrong.
They're by no means independent. What would it mean to have a
multirange without the underlying range type? Also, we already
treat the multirange as dependent for some things:
d=# create type varbitrange as range (subtype = varbit);
CREATE TYPE
d=# \dT
List of data types
Schema | Name | Description
--------+------------------+-------------
public | varbitmultirange |
public | varbitrange |
(2 rows)
d=# drop type varbitmultirange;
ERROR: cannot drop type varbitmultirange because type varbitrange requires it
HINT: You can drop type varbitrange instead.
d=# drop type varbitrange restrict;
DROP TYPE
d=# \dT
List of data types
Schema | Name | Description
--------+------+-------------
(0 rows)
So I think we're looking at a half-baked dependency design,
not two independent objects.
regards, tom lane
view thread (8+ messages) latest in thread
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], [email protected]
Subject: Re: ALTER TYPE OWNER fails to recurse to multirange
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