table owner of cloned databases

From: Stefan Fink <stefan(at)work(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: table owner of cloned databases
Date: 2006-03-27 17:04:51
Message-ID: e095vj$fi9$2@sea.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

I would like to create a database based upon a template which also
contains some tables. After invoking

psql -T <templateName> -U <dbuser> -O <dbowner> test

the new database 'test' belongs to <dbowner> but all tables are still
belonging to the user who owns the template <templateName>. This results
in the following error message when accessing the tables:

ERROR: permission denied for relation <some table>

Of course, I could alter the permissions in way that <dbowner> has
access to all tables. But it would be much nicer, if the owner of the
cloned database were inherited to all tables. Is there a way to achieve
this?

Thanks in advance,
Stefan.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Baguette 2006-03-27 17:12:52 How can I known the size of a database, table by table ?
Previous Message Scott Marlowe 2006-03-27 16:49:12 Re: Advantages of PostgreSQL over MySQL 5.0