Re: syntax errors at "line 1" when executing every command

Lists: pgsql-general
From: "Steven De Vriendt" <gisaalter(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: syntax errors at "line 1" when executing every command
Date: 2008-02-28 20:42:00
Message-ID: 8d2ea9d70802281242l6f1374efuf4bbb77b36eb5162@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hi list,

I'm using the latest postgreSQL with the lastest postgis.
When executing every command I want to use, I get the following error
message:

postgis=# createdb;
ERROR: syntax error at or near "createdb"
LINE 1: createdb;
^

I can use psql to reach my database, but after that I'm finished.
Can't use any command. I thought this was a Vista (PATH) issue
so I turned to Windows XP, however, I encounter the exact
same issue. What am I doing wrong ??

Thx
Steven


From: Colin Wetherbee <cww(at)denterprises(dot)org>
To: Steven De Vriendt <gisaalter(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: syntax errors at "line 1" when executing every command
Date: 2008-02-28 21:03:44
Message-ID: 47C721B0.8080703@denterprises.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Steven De Vriendt wrote:
> I'm using the latest postgreSQL with the lastest postgis.
> When executing every command I want to use, I get the following error
> message:
>
> postgis=# createdb;
> ERROR: syntax error at or near "createdb"
> LINE 1: createdb;

What other commands are you trying?

"createdb" is not a valid SQL or psql command. You're looking for
CREATE DATABASE... or the "createdb" command line tool.

Colin


From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: syntax errors at "line 1" when executing every command
Date: 2008-02-28 21:04:37
Message-ID: fq77l3$5rs$1@ger.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Steven De Vriendt wrote on 28.02.2008 21:42:
> Hi list,
>
> I'm using the latest postgreSQL with the lastest postgis.
> When executing every command I want to use, I get the following error
> message:
>
> postgis=# createdb;
> ERROR: syntax error at or near "createdb"
> LINE 1: createdb;
> ^
>
> I can use psql to reach my database, but after that I'm finished.
> Can't use any command. I thought this was a Vista (PATH) issue
> so I turned to Windows XP, however, I encounter the exact
> same issue. What am I doing wrong ??

createdb is an OS-level command, it is not a psql command!
The equivalent SQL command is "CREATE DATABASE"

Thomas


From: Michael Glaesemann <michael(dot)glaesemann(at)myyearbook(dot)com>
To: "Steven De Vriendt" <gisaalter(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: syntax errors at "line 1" when executing every command
Date: 2008-02-28 21:13:45
Message-ID: 7EE73BEE-E0C0-4E1C-A450-D07A3E6D0FE9@myyearbook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general


On 2008-02-28, at 3:42 PM, Steven De Vriendt wrote:

> Hi list,
>
> I'm using the latest postgreSQL with the lastest postgis.
> When executing every command I want to use, I get the following
> error message:
>
> postgis=# createdb;
> ERROR: syntax error at or near "createdb"
> LINE 1: createdb;

createdb is a command line application. You're looking for the CREATE
DATABASE SQL command:

http://www.postgresql.org/docs/8.3/interactive/sql-createdatabase.html

Michael Glaesemann
michael(dot)glaesemann(at)myyearbook(dot)com