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

Re: Starting psql without a database?

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Fred Parkinson" <FredP(at)abag(dot)ca(dot)gov>,<pgsql-admin(at)postgresql(dot)org>
Subject: Re: Starting psql without a database?
Date: 2011-04-27 18:51:10
Message-ID: 4DB81F4E020000250003CF57@gw.wicourts.gov (view raw or flat)
Thread:
Lists: pgsql-admin
"Fred Parkinson" <FredP(at)abag(dot)ca(dot)gov> wrote:
 
> I tried using the database 'postgres' which seems to be created
> during the install:
> psql postgres, which takes me to a psql prompt.  However, the
> command createdb -T DEFAULT "timecard" now results in the error
> "syntax error at or neat "createdb" with a carat pointing to the
> 'c' in 'createdb'.
 
I think you're confusing the OS command-line executable createdb:
 
http://www.postgresql.org/docs/9.0/interactive/app-createdb.html
 
and the SQL command CREATE DATABASE:
 
http://www.postgresql.org/docs/9.0/interactive/sql-createdatabase.html
 
-Kevin

In response to

Responses

pgsql-admin by date

Next:From: Mark StosbergDate: 2011-04-27 19:35:14
Subject: Re: best practice for moving millions of rows to child table when setting up partitioning?
Previous:From: Fred ParkinsonDate: 2011-04-27 18:44:45
Subject: Starting psql without a database?

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