pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@gmail.com>
To: mkumbale <mkumbale@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Creating a new database with a TEMPLATE did not work
Date: Mon, 25 Feb 2013 14:56:23 -0800
Message-ID: <512BEC17.6060403@gmail.com> (raw)
In-Reply-To: <1361832568260-5746627.post@n5.nabble.com>
References: <1361832568260-5746627.post@n5.nabble.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>

On 02/25/2013 02:49 PM, mkumbale wrote:
> Hi, I am new to PostgreSQL.  I have an empty PostgreSQL DB containing tables
> but no data.  I issued the following command in PGADMIN SQL editor:
>
> CREATE DATABASE "NewDefault"
>    WITH OWNER = postgres
>         ENCODING = 'UTF8'
>         TEMPLATE = Default
>         TABLESPACE = pg_default
>         LC_COLLATE = 'English_United States.1252'
>         LC_CTYPE = 'English_United States.1252'
>         CONNECTION LIMIT = -1;
>
> Although it created the NewDefault DB, it does not contain any of the tables
> in Default.  Default was disconnected when I executed this command.
>
> What am I doing something wrong?

So you have a database named Default?

Probably not a good name because:
http://www.postgresql.org/docs/9.2/interactive/sql-createdatabase.html

template
The name of the template from which to create the new database, or 
DEFAULT to use the default template (template1).

So at a guess you are actually creating the new database from template1.

>
> Thanks,
> Murali
>
>
>
> --
> View this message in context: http://postgresql.1045698.n5.nabble.com/Creating-a-new-database-with-a-TEMPLATE-did-not-work-tp57466...
> Sent from the PostgreSQL - sql mailing list archive at Nabble.com.
>
>


-- 
Adrian Klaver
adrian.klaver@gmail.com


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



view thread (4+ messages)  latest in thread

Message-ID: <512BEC17.6060403@gmail.com>
Permalink:  ../512BEC17.6060403@gmail.com/
Also on:    postgresql.org/message-id/512BEC17.6060403@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: adrian.klaver@gmail.com, mkumbale@gmail.com
  Subject: Re: Creating a new database with a TEMPLATE did not work
  In-Reply-To: <512BEC17.6060403@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox