Re: How to restore a dump containing CASTs into a database with a new user?

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: Thorsten Schöning <tschoening(at)am-soft(dot)de>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: How to restore a dump containing CASTs into a database with a new user?
Date: 2020-07-20 14:34:57
Message-ID: FD2BE542-D6BD-49A2-B5B0-F6DCDB5CB960@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On Jul 20, 2020, at 02:28, Thorsten Schöning <tschoening(at)am-soft(dot)de> wrote:
>
> Would be far easier if Postgres would do that automatically like it
> seems to do for most other objects. The important point is that owning
> those types seems to be per database, so things should be safe to do
> automatically.

I'm not sure I understand exactly how this "feature" would work. It seems to be "in the case that I am using CASTs that include internal types and restoring to a different, non-superuser user than the original one in the database that was dumped from, change the owner of internal types to make sure that my CAST restores work." That strikes me as a *very* ad hoc feature indeed.

--
-- Christophe Pettus
xof(at)thebuild(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Francisco Olarte 2020-07-20 14:44:16 Re: Improvement for query planner? (no, not about count(*) again ;-))
Previous Message Michel Pelletier 2020-07-20 14:28:09 Re: how to "explain" some ddl