Unix Technical Forum

create database with template question

This is a discussion on create database with template question within the pgsql Admins forums, part of the PostgreSQL category; --> Hi, ******* I have a database with a table and some triggers and functions set on it. I converted ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Admins

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-14-2008, 05:48 PM
Dev
 
Posts: n/a
Default create database with template question

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




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-14-2008, 05:48 PM
Scott Marlowe
 
Posts: n/a
Default Re: create database with template question

On Thu, Jul 10, 2008 at 7:24 AM, Dev <dev_hyd2001@yahoo.com> wrote:
> 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?


expected behaviour.

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:19 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com