From: | KÖPFERL Robert <robert(dot)koepferl(at)sonorys(dot)at> |
---|---|
To: | PostgreSQL Novice <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: N/A |
Date: | 2005-01-17 10:47:26 |
Message-ID: | ED4E30DD9C43D5118DFB00508BBBA76EB1655B@neptun.sonorys.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
your problem is that you're missing a 'start'-database. Thus you should log
into temlate1-db where you are then able to submit your CREATE DB
> -----Original Message-----
> From: Keith Worthington [mailto:keithw(at)narrowpathinc(dot)com]
> Sent: Freitag, 14. Jänner 2005 18:43
> To: PostgreSQL Novice
> Subject: [NOVICE] N/A
>
>
> Hi All,
>
> I thought that I could quickly create a new and empty
> database using psql but
> I obviously have the syntax messed up. I have already worked
> around the issue
> by using pgadmin but I would appreciate your time if you
> could explain the
> correct way to accomplish this with psql. TIA
>
> # psql --username postgres --echo-all --command "CREATE
> DATABASE NEW_DB WITH
> ENCODING = 'SQL_ASCII';"
> psql: FATAL: Database "postgres" does not exist in the
> system catalog.
>
> # psql --dbname template1 --username postgres --echo-all
> --command "CREATE
> DATABASE NEW_DB WITH ENCODING = 'SQL_ASCII';"
> CREATE DATABASE NEW_DB WITH ENCODING = 'SQL_ASCII';
> ERROR: CREATE DATABASE: source database "template1" is being
> accessed by
> other users
>
> Kind Regards,
> Keith
>
> ______________________________________________
> 99main Internet Services http://www.99main.com
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 8: explain analyze is your friend
>
From | Date | Subject | |
---|---|---|---|
Next Message | Sylvain Brohée | 2005-01-17 11:06:45 | Change the name of the database |
Previous Message | Prasanna Srinivasan Venkatasubramanian | 2005-01-17 06:19:32 | Backup database and logs |