Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id D83F065052F for ; Thu, 10 Jul 2008 11:33:25 -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 33154-03 for ; Thu, 10 Jul 2008 11:33:13 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.30]) by postgresql.org (Postfix) with ESMTP id 9FEF465050C for ; Thu, 10 Jul 2008 11:33:19 -0300 (ADT) Received: by yx-out-2324.google.com with SMTP id 8so938400yxb.73 for ; Thu, 10 Jul 2008 07:33:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=ZB0aLNn7yOfGLPBwSFhIqw8LKN/vUnwbXcc/n9qwsxY=; b=IkHc173S5U/cKC943eYBLUi8Kb931wYyHGhA7yfRs8sRizXKZ8x0t9V9aW5XNR9sqv KIPn1Fzu9azPCjopj1i3uDVK/FAr1+fyNbq9DHFYu139K6Y2fEP1gPZwMQYUqf5i8E+F 2jGZ38VH4vw9Do8XLkBUVbZP0kU5gurjb9/Lk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=Tf4wd1hSnU8wIFLNWFaTNtVQxXWkrsjodhMxecuxPaRNRE/F7mdBP0MKaK5iJtLdZT nbxTSIHHU6Rj8YzG8Wi/kabSXYoyaraMBbDlyXdJgoLxuT9CdfwSDNIJNHXvikryWGB5 qlXJkN08mnJl3TVGZEBqMtTb3x9LKT2HHPm6E= Received: by 10.115.47.1 with SMTP id z1mr10960831waj.129.1215700397315; Thu, 10 Jul 2008 07:33:17 -0700 (PDT) Received: by 10.114.130.17 with HTTP; Thu, 10 Jul 2008 07:33:17 -0700 (PDT) Message-ID: Date: Thu, 10 Jul 2008 08:33:17 -0600 From: "Scott Marlowe" To: dev_hyd2001@yahoo.com Subject: Re: create database with template question Cc: pgsql-admin@postgresql.org In-Reply-To: <962504.95815.qm@web53710.mail.re2.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <962504.95815.qm@web53710.mail.re2.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/104 X-Sequence-Number: 29714 On Thu, Jul 10, 2008 at 7:24 AM, Dev 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.