On Mon, Jan 15, 2024 at 1:27 PM Tom Lane <t...@sss.pgh.pa.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