Re: Database schema

From: Greg Williamson <gwilliamson39(at)yahoo(dot)com>
To: Dhiraj Gupta <dhiraj(dot)g(at)nic(dot)in>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Database schema
Date: 2012-12-04 09:40:34
Message-ID: 1354614034.63978.YahooMailNeo@web125902.mail.ne1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dhiraj --

>________________________________
> From: Dhiraj Gupta <dhiraj(dot)g(at)nic(dot)in>
>To: pgsql-general(at)postgresql(dot)org
>Sent: Sunday, December 2, 2012 9:35 PM
>Subject: [GENERAL] Database schema
>
>
> Hi All,
>I have  created a database name '"ofbiz". then the default  schema name "public " created automatically. I want to create schema name ofbiz in the database "ofbiz"
> when I create database name "ofbiz" then the schema name "ofbiz" will create automatically.
>how it is possible if yes,
>
>Thanks
>Dhiraj Gupta
>

When a new database is created, the template is the builtin database called "template1".

If you create the schema in that database, that schema will be made part of any new database you make. You could also make a new template database, create the schema in that one, and then create your new databases using the "WITH TEMPLATE = " option in CREATE DATABASE. So if you have need of different schemas with different databases, that would be more extensible by making new templates, onjhe3 for each type./.

HTH,

Greg Williamson

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andreas Kretschmer 2012-12-04 09:45:56 Re: Database schema
Previous Message Albe Laurenz 2012-12-04 09:37:28 Re: Database schema