Re: Setting owner for all tables

From: Serge Fonville <serge(dot)fonville(at)gmail(dot)com>
To: Chris McKinney <nowaydown1(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Setting owner for all tables
Date: 2009-02-10 14:40:25
Message-ID: 680cbe0e0902100640q25708627i5bb99ab5198f38cd@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,

The user creating the tables, is that the owner of the database or the super
user?'If it is the super user, you need tot do an ALTER TABLE to change the
owner.

Regards,

Serge Fonville

On Tue, Feb 10, 2009 at 3:18 PM, Chris McKinney <nowaydown1(at)gmail(dot)com>wrote:

> Hello all,
>
> I'm using a template database as the base for new database creation. The
> user executing this command is a superuser. Here's the SQL statement that
> I'm using for creating new databases:
>
> CREATE DATABASE mynewdatabase OWNER someuser TEMPLATE mytemplatedb ENCODING
> 'UTF8'.
>
> I noticed that all the tables still seem to be owned by the user that
> created the template database initially which isn't what I expected. Is
> there a step that I'm missing that will allow me to have all the tables /
> functions / etc ownership changed also? I'm running postgresql-8.1.
>
> Thanks!
>
>
>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Nico Callewaert 2009-02-10 15:50:54 Re: Cluster / Tablespace ?
Previous Message Chris McKinney 2009-02-10 14:18:39 Setting owner for all tables