Starting psql without a database?

From: "Fred Parkinson" <FredP(at)abag(dot)ca(dot)gov>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Starting psql without a database?
Date: 2011-04-27 18:44:45
Message-ID: 4DB801AD020000A700017012@gwia1.abag.ca.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Folks

As I have been unable to install pgadmin3 on my OpenSUSE Linux 10 box (erroneously described as 11.2 in the request for help post, that was useless), I have decided to use psql since it seems to be my only option.

However, I have no database as yet, and when I type in a console 'psql' I get the message "psql: FATAL: database 'username' does not exist"
So I try to start by sending the createdb command, as in: "psql -c createdb -T DEFAULT 'timecard'" but this returns the error "psql: FATAL: database "timecard" does not exist"

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'.

As usual, stuck again!

Any ideas greatly appreciated.
Fred

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Kevin Grittner 2011-04-27 18:51:10 Re: Starting psql without a database?
Previous Message Raghavendra 2011-04-27 15:05:23 Re: best practice for moving millions of rows to child table when setting up partitioning?