Re: Creating DB

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Lorenzo De Vito" <lorenzodevito(at)email(dot)it>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Creating DB
Date: 2001-08-01 14:13:42
Message-ID: 9406.996675222@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Lorenzo De Vito" <lorenzodevito(at)email(dot)it> writes:
> Is the only way to create DB in a C code to connect to Template1 and then e=
> xec the SQL string "CREATE DATABASE databasename" ?
> Can I create DB without connecting to template1 ?

You have to connect to *some* DB. Doesn't have to be template1, but
that's the most usual choice since it's certain to exist.

regards, tom lane

In response to

  • Creating DB at 2001-08-01 07:44:42 from Lorenzo De Vito

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2001-08-01 14:20:01 Re: How to restart postmaster after a violent shutdown ?
Previous Message Helge Bahmann 2001-08-01 11:55:14 Re: How to restart postmaster after a violent shutdown ?