Re: Set new owner on cloned database - Mailing list pgsql-general

From Ivan Sergio Borgonovo
Subject Re: Set new owner on cloned database
Date
Msg-id 20101208224118.2924e519@dawn.webthatworks.it
Whole thread Raw
In response to Set new owner on cloned database  ("James B. Byrne" <byrnejb@harte-lyne.ca>)
Responses Re: Set new owner on cloned database  (Guillaume Lelarge <guillaume@lelarge.info>)
List pgsql-general
On Wed, 8 Dec 2010 13:40:29 -0500 (EST)
"James B. Byrne" <byrnejb@harte-lyne.ca> wrote:

> I am testing a Rails deployment and wish to copy a database
> assigning it an new owner.  I have tried this:
>
> createdb --owner=hll_theheart_db_devl
> --template=hll_th_deploytest_prod hll_theheart_devl
>
> While this indeed sets the database owner to hll_theheart_db_devl
> everything else, schema, tables whatever, remains owned by the
> original owner.  Is there no way to change the owner everywhere in
> the cloned database using cretedb?  Or am I constrained to do a
> dump all and restore?

http://www.mail-archive.com/pgsql-hackers@postgresql.org/msg51048.html
http://www.mail-archive.com/pgsql-hackers@postgresql.org/msg51047.html

I'm not sure if there has been any progress in newer postgres to
support easier change of owner.
I'm not aware of any more current better solution.

Unfortunately I think the license of the above didn't help to make
people willing to improve and make the code more popular.

--
Ivan Sergio Borgonovo
http://www.webthatworks.it


pgsql-general by date:

Previous
From: "James B. Byrne"
Date:
Subject: Set new owner on cloned database
Next
From: "Reuven M. Lerner"
Date:
Subject: Re: Hanging with pg_restore and large objects