Skip site navigation (1) Skip section navigation (2)

Re: Starting psql without a database connection

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Michael Klatt <mdklatt(at)ou(dot)edu>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Starting psql without a database connection
Date: 2002-02-25 15:22:18
Message-ID: 1014650541.3217.6703.camel@linda (view raw or flat)
Thread:
Lists: pgsql-interfaces
On Sun, 2002-02-24 at 01:54, Michael Klatt wrote:
> Is there a way to start psql without connecting to a database?  Otherwise,
> what's the point of the 'CREATE DATABASE ...' command?

initdb creates the database template1, which is always there.  It serves
as the default template for all newly created databases.

So connect to template1 first and create your database from there.

-- 
Oliver Elphick                                Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C

     "Peace I leave with you, my peace I give unto you; not 
      as the world giveth, give I unto you. Let not your 
      heart be troubled, neither let it be afraid."         
                                John 14:27 


In response to

pgsql-interfaces by date

Next:From: Tom LaneDate: 2002-02-25 15:38:38
Subject: Re: template Database
Previous:From: Glenn MacGregorDate: 2002-02-25 14:01:37
Subject: libpq++ and threads

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group