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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to restore a dump containing CASTs into a database with a new user?
Дата
Msg-id 206414.1595183867@sss.pgh.pa.us
обсуждение исходный текст
Ответ на How to restore a dump containing CASTs into a database with a new user?  (Thorsten Schöning <tschoening@am-soft.de>)
Ответы Re: How to restore a dump containing CASTs into a database with a new user?  (Thorsten Schöning <tschoening@am-soft.de>)
Список pgsql-general
=?utf-8?Q?Thorsten_Sch=C3=B6ning?= <tschoening@am-soft.de> writes:
> Expectation was that whatever gets created in that DB is owned by the
> new user. But I'm running into the following error:

>> pg_restore: [archiver (db)] could not execute query: ERROR:  must be owner of type character varying or type inet

The error message seems pretty clear to me.

> Or can the CAST really only be created when the new DB-owner owns
> those types? Is that necessary per database then or globally for the
> public schema or one of the template databases or ...?

It's a security thing.  A user who can create such a cast can thereby
change the behavior of other people's queries.

            regards, tom lane



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

Предыдущее
От: Thorsten Schöning
Дата:
Сообщение: How to restore a dump containing CASTs into a database with a new user?
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Re: PG 9.5.5 cores on AIX 7.1