Re: Feature bug dumpall CREATE ROLE postgres

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Feature bug dumpall CREATE ROLE postgres
Дата
Msg-id 2149099.1709064762@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Feature bug dumpall CREATE ROLE postgres  (Jim Wilson <jim@wreath.com>)
Ответы Re: Feature bug dumpall CREATE ROLE postgres  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: Feature bug dumpall CREATE ROLE postgres  (Jim Wilson <jim@wreath.com>)
Re: Feature bug dumpall CREATE ROLE postgres  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-bugs
Jim Wilson <jim@wreath.com> writes:
> Including "CREATE ROLE postgres;" in the dumpall will cause the script to
> throw an error.

I believe the reason pg_dumpall does that is to avoid worse failures
if the target installation has a different bootstrap superuser name
than the source did.  One error is easier to ignore than hundreds
of 'em.

We could avoid that problem if we wanted to invent and use CREATE
OR REPLACE ROLE, but that would have downsides of its own, such as
silently overwriting the properties of any roles that already exist
in the target (IOW, the cases where you *want* to get that error).

Maybe it'd work to invent C.O.R.R. but only use it for the bootstrap
superuser, with plain CREATE ROLE for the rest.  Haven't really
thought through the consequences of that.

            regards, tom lane



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: BUG #18367: Cannot drop schema
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Feature bug dumpall CREATE ROLE postgres