Re: ALTER TYPE OWNER fails to recurse to multirange

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: ALTER TYPE OWNER fails to recurse to multirange
Date: 2024-01-15 19:17:08
Message-ID: CA+TgmoZZFj_XQi9_nJ7f-6jQk=-m+Ki9RTAehBWf9E21bVmS+Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 15, 2024 at 1:27 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> That's pretty broken, isn't it? joe would own the multirange if he'd
> created the range to start with. Even if you think the ownerships
> ideally should be separable, this behavior causes existing pg_dump
> files to restore incorrectly, because pg_dump assumes it need not emit
> any commands about the multirange.

I agree that pg_dump doing the wrong thing is bad, but the SQL example
doesn't look broken if you ignore pg_dump. I have a feeling that the
source of the awkwardness here is that one SQL command is creating two
objects, and unlike the case of a table and a TOAST table, one is not
an implementation detail of the other or clearly subordinate to the
other. But how does that prevent us from making pg_dump restore the
ownership and permissions on each separately? If ownership is a
problem, aren't permissions also?

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-01-15 19:17:24 Re: Oversight in reparameterize_path_by_child leading to executor crash
Previous Message Robert Haas 2024-01-15 19:07:13 Re: [PATCH] LockAcquireExtended improvement