cannot makedb
cannot makedb
От:
"Stephen Choularton" <mail@bymouth.com>
Дата:
Hi
Really lost. I have managed to get the prompt working but when I try to make a db nothing happens. (I am on windows XP)
template1-# \l
List of databases
Name | Owner | Encoding
-----------+----------+-----------
template0 | postgres | SQL_ASCII
template1 | postgres | SQL_ASCII
(2 rows)
template1-# makedb mydb
template1-# \l
List of databases
Name | Owner | Encoding
-----------+----------+-----------
template0 | postgres | SQL_ASCII
template1 | postgres | SQL_ASCII
(2 rows)
Can anyone tell me what I am doing wrong?
Stephen
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.8.4 - Release Date: 27/03/2005
Re: cannot makedb
template1=# \h CREATE DATABASE
Command: CREATE DATABASE
Description: create a new database
Syntax:
CREATE DATABASE name
[ [ WITH ] [ OWNER [=] dbowner ]
[ TEMPLATE [=] template ]
[ ENCODING [=] encoding ]
[ TABLESPACE [=] tablespace ] ]
-- Andrei Reinus
-- "#define QUESTION ((bb) || !(bb)) - Shakespeare."
Stephen Choularton wrote:
> Hi
>
>
>
> Really lost. I have managed to get the prompt working but when I try
> to make a db nothing happens. (I am on windows XP)
>
>
>
> template1-# \l
>
> List of databases
>
> Name | Owner | Encoding
>
> -----------+----------+-----------
>
> template0 | postgres | SQL_ASCII
>
> template1 | postgres | SQL_ASCII
>
> (2 rows)
>
>
>
> template1-# makedb mydb
>
> template1-# \l
>
> List of databases
>
> Name | Owner | Encoding
>
> -----------+----------+-----------
>
> template0 | postgres | SQL_ASCII
>
> template1 | postgres | SQL_ASCII
>
> (2 rows)
>
>
>
> Can anyone tell me what I am doing wrong?
>
>
>
> Stephen
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.308 / Virus Database: 266.8.4 - Release Date: 27/03/2005
>
Re: cannot makedb
От:
"Van Ingen, Lane" <lvaningen@ESNCC.com>
Дата:
There is no such command (that I know of). Looks like you really want to do a createdb or CREATE DATABASE command. createdb can be issued from an operating system prompt; CREATE DATABASE would be executed from inside psql. Both will crteate a database for you. If you have a Postgres manual (version 8.0), createdb is described on p/ 929, CREATE DATABASE on p. 743. -----Original Message----- From: pgsql-novice-owner@postgresql.org on behalf of Stephen Choularton Sent: Tue 3/29/2005 2:33 AM To: pgsql-novice@postgresql.org Cc: Subject: [NOVICE] cannot makedb Hi Really lost. I have managed to get the prompt working but when I try to make a db nothing happens. (I am on windows XP) template1-# \l List of databases Name | Owner | Encoding -----------+----------+----------- template0 | postgres | SQL_ASCII template1 | postgres | SQL_ASCII (2 rows) template1-# makedb mydb template1-# \l List of databases Name | Owner | Encoding -----------+----------+----------- template0 | postgres | SQL_ASCII template1 | postgres | SQL_ASCII (2 rows) Can anyone tell me what I am doing wrong? Stephen -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.8.4 - Release Date: 27/03/2005
Re: cannot makedb
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Van Ingen, Lane" writes: > There is no such command (that I know of). Looks like you really want to do a createdb or CREATE DATABASE > command. createdb can be issued from an operating system prompt; CREATE DATABASE would be executed from > inside psql. Both will crteate a database for you. Also, the reason "nothing happened" is you didn't enter a semicolon. A SQL command isn't complete until you do. Had you typed "makedb mydb;" then at least you'd have gotten a SQL syntax error, which might have led your thoughts in the correct direction ... regards, tom lane