create database with template question

From: Dev <dev_hyd2001(at)yahoo(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: create database with template question
Date: 2008-07-10 13:24:14
Message-ID: 962504.95815.qm@web53710.mail.re2.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,

        I have a database with a table and some triggers and functions set on it. I converted it into a template setting the fields datallowcon=false and datistemplate=true on it. Lets assume this template(database) is called as mytemplate.

Now, as a normal database user I issue the create database command and specify mytemplate

i.e

create database testdb template mytemplate;

Everything works fine except that the table in the newly created testdb is still the user postgres, the one who created the template database.

Is this expected behavior or am I missing something?

/Dev

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Marlowe 2008-07-10 14:33:17 Re: create database with template question
Previous Message Julius Tuskenis 2008-07-10 10:39:05 Re: query optimization