Thread: psql doesn't work

psql doesn't work

From
"stas kim"
Date:
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.

oh, im running
   -- openbsd 3.3
   -- postgresql 7.3.2


thanx

Re: psql doesn't work

From
Ernest E Vogelsinger
Date:
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/