Re: Changing DB ownership

Поиск
Список
Период
Сортировка
От Sander Steffann
Тема Re: Changing DB ownership
Дата
Msg-id 002201c35bfa$61530c10$c801a8c0@office.computel.nl
обсуждение исходный текст
Ответ на Changing DB ownership  (Christopher Murtagh <christopher.murtagh@mcgill.ca>)
Ответы Re: Changing DB ownership  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-general
Hi,

> Why would you want to do that?
>
> Why not do it an easier way and dump the database and restore it into
> your new database?
>
> There's got to be a lot of stuff to consider when doing something as
> radical as renaming a database.

He is not talking about renaming his database, he is talking about changing
the OWNER of the database.

> >UPDATE pg_database SET datdba = 504 WHERE datname='chris';

This is how I change the owner of the database too. It's not that diffucult,
but it would be nice if it could be changed using an ALTER statement.

I have noticed in the past that the dumps produced by pg_dump are difficult to
restore if the datdba you change to has no rights to create databases. I
haven't tested this with recent releases though. I suspect that this has
already been fixed in pg_dump.

Bye,
Sander.


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

Предыдущее
От: "Mario Weilguni"
Дата:
Сообщение: Re: pg_xlog question
Следующее
От: psql-mail@freeuk.com
Дата:
Сообщение: tsearch2 on postgresql 7.3.4