Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 91E0465032E for ; Thu, 10 Jul 2008 10:24:20 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 68294-08 for ; Thu, 10 Jul 2008 10:24:11 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from web53710.mail.re2.yahoo.com (web53710.mail.re2.yahoo.com [206.190.37.31]) by postgresql.org (Postfix) with SMTP id 83F08650162 for ; Thu, 10 Jul 2008 10:24:16 -0300 (ADT) Received: (qmail 96157 invoked by uid 60001); 10 Jul 2008 13:24:15 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Message-ID; b=CqtY2xqFinv1OGDtNVnbSXjRztoYffcfcHuCOhNCZWbacN/4AO4S5RT48sew5oT1y8xw42T9FNplRRHTbmWLt3Q98MFnr9pqKBdMLYbZJ4wbBz9hffiYt55aAQzpYd4LJP42rmcAz/eamNiD0qjU2Ax2i70+IIa66S9jx11cfzw=; Received: from [82.182.120.68] by web53710.mail.re2.yahoo.com via HTTP; Thu, 10 Jul 2008 06:24:14 PDT X-Mailer: YahooMailWebService/0.7.199 Date: Thu, 10 Jul 2008 06:24:14 -0700 (PDT) From: Dev Reply-To: dev_hyd2001@yahoo.com Subject: create database with template question To: pgsql-admin@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1987921957-1215696254=:95815" Message-ID: <962504.95815.qm@web53710.mail.re2.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.517 tagged_above=0 required=5 tests=AWL=0.516, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200807/103 X-Sequence-Number: 29713 --0-1987921957-1215696254=:95815 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi, =A0=A0=A0=A0=A0=A0=A0 I have a database with a table and some triggers and = functions set on it. I converted it into a template setting the fields data= llowcon=3Dfalse and datistemplate=3Dtrue on it. Lets assume this template(d= atabase) is called as mytemplate. Now, as a normal database user I issue the create database command and spec= ify mytemplate i.e=20 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 =0A=0A=0A --0-1987921957-1215696254=:95815 Content-Type: text/html; charset=us-ascii
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

--0-1987921957-1215696254=:95815--