Re: psql doesn't work - Mailing list pgsql-admin

From Ernest E Vogelsinger
Subject Re: psql doesn't work
Date
Msg-id 5.1.1.6.2.20030614152608.03bb5c20@mail.vogelsinger.at
Whole thread Raw
In response to psql doesn't work  ("stas kim" <tolko_ot_tebya@pisem.net>)
List pgsql-admin
At 12:09 14.06.2003, stas kim said:
--------------------[snip]--------------------
>Hi there.
>im new to pgsql so mayby i did smth wrong 8)
>when i run psql and then any sql command nothing happans
>but when i type the same thing from shell with -c parameter everything works
>fine.
--------------------[snip]--------------------

did you add a semicolon after the SQL command?

psql gives you hints if statements have not been yet completed:

test=#
    means "database "test" is ready, waiting for a command"

test-#
    means the preceding command has not yet been completed (semicolon missing)

test(#
    means there's at least one open parenthesis

Example:

test=# SELECT * FROM mytable
test-# WHERE column in (
test(# 1,2,3)
test-# and nothing is null
test-# ;
    output from command goes here
test=#

Hope this helps,

--
   >O     Ernest E. Vogelsinger
   (\)    ICQ #13394035
    ^     http://www.vogelsinger.at/



pgsql-admin by date:

Previous
From: "stas kim"
Date:
Subject: psql doesn't work
Next
From: "Mendola Gaetano"
Date:
Subject: Re: statistics question