Re: psql in shell
От | Stephan Szabo |
---|---|
Тема | Re: psql in shell |
Дата | |
Msg-id | 20030407102328.C35893-100000@megazone23.bigpanda.com обсуждение исходный текст |
Ответ на | psql in shell ("rx" <rong.xie@stud.tu-muenchen.de>) |
Список | pgsql-general |
On Fri, 4 Apr 2003, rx wrote: (This really didn't need to go to all those lists/people, so replying to general only) > Can you help me for my another question? > But when I execute it with "where-condition" in shell as under, come a Error. > > PS: VEIrx is database name. Faxeingang is table name. Filename is column name. > > TuxFax:~ # echo 'select * from "Faxeingang" where "Filename"=ddf.tif;'|psql VEIrx -U postgres > > ERROR: Relation "ddf" does not exist Right because that's select * from "Faxeingang" where "Filename" = ddf.tif; (ie, a reference to a tif column of a table named ddf) > TuxFax:~ # echo 'select * from "Faxeingang" where "Filename"='ddf.tif';'|psql VEIrx -U postgres > > ERROR: Relation "ddf" does not exist This is probably the same as the above (run just the echo part in your shell). > TuxFax:~ # echo 'select * from "Faxeingang" where "Filename"="ddf.tif";'|psql VEIrx -U postgres > > ERROR: Attribute 'ddf.tif' not found This is select * from "Faxeingang" where "Filename" = "ddf.tif" (ie, a reference to a column named ddf.tif in Faxeingang. How about something like: echo "select * from \"Faxeingang\" where \"Filename\"='ddf.tif';"
В списке pgsql-general по дате отправления: