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

Поиск
Список
Период
Сортировка
От Thorsten Schöning
Тема Re: How to restore a dump containing CASTs into a database with a new user?
Дата
Msg-id 929298897.20200719232557@am-soft.de
обсуждение исходный текст
Ответ на Re: How to restore a dump containing CASTs into a database with a new user?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: How to restore a dump containing CASTs into a database with a new user?
Список pgsql-general
Guten Tag Tom Lane,
am Sonntag, 19. Juli 2020 um 22:37 schrieben Sie:

> In this case, you have to restore the cast as superuser, because nobody
> else is going to be treated as owning these built-in types.

How do I do that when I have large dumps with lots of those CASTs and
in worst case don't even know that, because it's of some proprietary
app?

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?

And I don't mean individually GRANTing permissions on tables and
sequences and ... and taking additionally care of defauolts in case
new tables and sequences and ... get added. That reads so complicated.
I simply want to make everything in a database owned by one user, like
is easily possible in e.g. file systems and is the case with how I
restored.

But then CASTs don't work easily.

Mit freundlichen Grüßen,

Thorsten Schöning

--
Thorsten Schöning       E-Mail: Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow




В списке pgsql-general по дате отправления:

Предыдущее
От: Thorsten Schöning
Дата:
Сообщение: Re: How to restore a dump containing CASTs into a database with a new user?
Следующее
От: Christophe Pettus
Дата:
Сообщение: Re: How to restore a dump containing CASTs into a database with a new user?