From: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
---|---|
To: | mkumbale <mkumbale(at)gmail(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Creating a new database with a TEMPLATE did not work |
Date: | 2013-02-25 22:56:23 |
Message-ID: | 512BEC17.6060403@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-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-tp5746627.html
> Sent from the PostgreSQL - sql mailing list archive at Nabble.com.
>
>
--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Ben Morrow | 2013-02-26 02:46:54 | Re: Creating a new database with a TEMPLATE did not work |
Previous Message | mkumbale | 2013-02-25 22:49:28 | Creating a new database with a TEMPLATE did not work |