[GENERAL] Set new owner on cloned database

2010-12-08 Thread James B. Byrne
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

Re: [GENERAL] Set new owner on cloned database

2010-12-08 Thread Ivan Sergio Borgonovo
On Wed, 8 Dec 2010 13:40:29 -0500 (EST) James B. Byrne byrn...@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

Re: [GENERAL] Set new owner on cloned database

2010-12-08 Thread Guillaume Lelarge
Le 08/12/2010 22:41, Ivan Sergio Borgonovo a écrit : On Wed, 8 Dec 2010 13:40:29 -0500 (EST) James B. Byrne byrn...@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

Re: [GENERAL] Set new owner on cloned database

2010-12-08 Thread James B. Byrne
On Wed, December 8, 2010 17:46, Guillaume Lelarge wrote: You should try REASSIGN OWNED BY. See http://www.postgresql.org/docs/9.0/interactive/sql-reassign-owned.html Thanks for that. I ended up doing a pg_dump followed by a sed followed by a psql which sufficed for my purposes, even it it