SQL statement form shell ?

From: czezz <czezz(at)o2(dot)pl>
To: pgsql-admin(at)postgresql(dot)org
Subject: SQL statement form shell ?
Date: 2014-08-27 15:04:34
Message-ID: 50235644.468fa51b.53fdf382.a46b@o2.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Im trying to execute simple query in shell.
This query works OK in PSQL client:
Server4=# SELECT * FROM foo2;

However, for some reason I cannot execute it in shell. I try it like following:

-bash-4.1$ psql -p 5472 -d fm_db_Server4 -c "SELECT * FROM foo2;"
ERROR: relation "foo2" does not exist
LINE 1: SELECT * FROM foo2;
^

Any ideas what Im doing wrong ?

BR,
czezz

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Raghavendra 2014-08-27 15:13:45 Re: SQL statement form shell ?
Previous Message Albe Laurenz 2014-08-27 08:44:34 Re: invalid byte sequence for encoding "UTF8": 0x00