syntax errors at "line 1" when executing every command

Started by Steven De Vriendtabout 18 years ago4 messagesgeneral
Jump to latest
#1Steven De Vriendt
gisaalter@gmail.com

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

#2Colin Wetherbee
cww@denterprises.org
In reply to: Steven De Vriendt (#1)
Re: syntax errors at "line 1" when executing every command

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

#3Thomas Kellerer
spam_eater@gmx.net
In reply to: Steven De Vriendt (#1)
Re: syntax errors at "line 1" when executing every command

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

#4Michael Glaesemann
grzm@seespotcode.net
In reply to: Steven De Vriendt (#1)
Re: syntax errors at "line 1" when executing every command

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.glaesemann@myyearbook.com