Re: How to restore a dump containing CASTs into a database with a new user? - Mailing list pgsql-general

From Christophe Pettus
Subject Re: How to restore a dump containing CASTs into a database with a new user?
Date
Msg-id B84FCC25-E4EE-4441-9788-9324FD9E0D2B@thebuild.com
Whole thread Raw
In response to Re: How to restore a dump containing CASTs into a database with a new user?  (Thorsten Schöning <tschoening@am-soft.de>)
Responses Re: How to restore a dump containing CASTs into a database with a new user?
List pgsql-general

> On Jul 19, 2020, at 14:25, Thorsten Schöning <tschoening@am-soft.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/restoreas a way of changing ownership all at once.  This is not infrequent when you have an existing database in
whicha superuser owns everything 
--
-- Christophe Pettus
   xof@thebuild.com




pgsql-general by date:

Previous
From: Thorsten Schöning
Date:
Subject: Re: How to restore a dump containing CASTs into a database with a new user?
Next
From: Thomas Munro
Date:
Subject: Re: PG 9.5.5 cores on AIX 7.1