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-19 21:38:55
Message-ID: B84FCC25-E4EE-4441-9788-9324FD9E0D2B@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On Jul 19, 2020, at 14:25, Thorsten Schöning <tschoening(at)am-soft(dot)de> wrote:
> Would I need to restore the whole dump as super user? But how do I own
> all those restored contents to some other database user afterwards?

In this case, you may need to change the ownership of the various objects directly in the database, rather than using dump/restore as a way of changing ownership all at once. This is not infrequent when you have an existing database in which a superuser owns everything
--
-- Christophe Pettus
xof(at)thebuild(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Munro 2020-07-19 22:34:28 Re: PG 9.5.5 cores on AIX 7.1
Previous Message Thorsten Schöning 2020-07-19 21:25:57 Re: How to restore a dump containing CASTs into a database with a new user?