X-Original-To: pgadmin-hackers@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 0297C475D0F; Mon, 7 Apr 2003 14:23:05 -0400 (EDT) Received: from europa.janwieck.net (h00045a2e4e7c.ne.client2.attbi.com [24.131.181.55]) by postgresql.org (Postfix) with ESMTP id D9C6B4758E6; Mon, 7 Apr 2003 14:23:03 -0400 (EDT) Received: from Yahoo.com (linksys.janwieck.net [192.168.192.1]) (authenticated) by europa.janwieck.net (8.11.6/8.11.6) with ESMTP id h37IN1a16699; Mon, 7 Apr 2003 14:23:02 -0400 Message-ID: <3E91C1F2.B7F20BF4@Yahoo.com> Date: Mon, 07 Apr 2003 14:22:42 -0400 From: Jan Wieck Organization: Home X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en,ru MIME-Version: 1.0 To: rx Cc: pgadmin-hackers , pgadmin-support@postgresql.org, pgsql-docs@postgresql.org, pgsql-general@postgresql.org, pgsql-general-owner@postgresql.org Subject: Re: [GENERAL] psql in shell References: <005e01c2faa5$a31056a0$16e1f48a@IPSM7N> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-10.6 required=5.0 tests=BAYES_01,QUOTED_EMAIL_TEXT,REFERENCES,SUSPICIOUS_RECIPS, WEIRD_QUOTING autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/56 X-Sequence-Number: 1030 What about \' ?!? BTW, some of the attempts are at least funny. Jan > rx wrote: > > hallo, > > Can you help me for my another question? > > It work good as under in shell without "where-condition" . > > TuxFax:~ # echo 'select * from "Faxeingang";'|psql VEIrx -U postgres > > PS: VEIrx is database name. Faxeingang is table name. In SuSE Linux > 8.0, bash, postgreSQL7.2.2 > > DatumFaxeingang | Filename | CSID > > ------------------------+-------------------------+----------- > > 2003-04-03 17:30:45+02 | 2003_04_03_17_30_45.tif | Fax > > 2003-04-04 10:01:01+02 | df.tif | ds > > 2003-04-04 10:01:04+02 | ddf.tif | aa > > (36 rows) > > TuxFax:~ # > > > > It work good as under in psql with "where-condition" . > > PS: VEIrx is database name. Faxeingang is table name. Filename is > column name. > > postgres@TuxFax:/root> psql VEIrx > > Welcome to psql, the PostgreSQL interactive terminal. > > Type: \copyright for distribution terms > > \h for help with SQL commands > > \? for help on internal slash commands > > \g or terminate with semicolon to execute query > > \q to quit > > VEIrx=# select * from "Faxeingang" where "Filename"='ddf.tif'; > > DatumFaxeingang | Filename | CSID > > ------------------------+----------+------ > > 2003-04-04 10:01:04+02 | ddf.tif | aa > > (1 row) > > > > 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 > > TuxFax:~ # echo 'select * from "Faxeingang" where > "Filename"='ddf.tif';'|psql VEIrx -U postgres > > ERROR: Relation "ddf" does not exist > > TuxFax:~ # echo 'select * from "Faxeingang" where > "Filename"="ddf.tif";'|psql VEIrx -U postgres > > ERROR: Attribute 'ddf.tif' not found > > TuxFax:~ # echo 'select * from "Faxeingang" where > "Filename"="'ddf.tif'";'|psql VEIrx -U postgres > > ERROR: Attribute 'ddf.tif' not found > > TuxFax:~ # echo 'select * from "Faxeingang" where > "Filename"=""ddf.tif"";'|psql VEIrx -U postgres > > ERROR: zero-length delimited identifier > > TuxFax:~ # echo 'select * from "Faxeingang" where > "Filename"=''ddf.tif'';'|psql VEIrx -U postgres > > ERROR: Relation "ddf" does not exist > > TuxFax:~ # echo 'select * from "Faxeingang" where > "Filename"=/ddf.tif/;'|psql VEIrx -U postgres > > ERROR: parser: parse error at or near ";" > > TuxFax:~ # echo 'select * from "Faxeingang" where > "Filename"=/ddf.tif/'|psql VEIrx -U postgres > > ERROR: parser: parse error at or near "" > > TuxFax:~ # echo 'select * from "Faxeingang" where > "Filename"=/'ddf.tif'/;'|psql VEIrx -U postgres > > ERROR: parser: parse error at or near ";" > > TuxFax:~ # echo 'select * from "Faxeingang" where > "Filename"='/ddf.tif/';'|psql VEIrx -U postgres > > ERROR: parser: parse error at or near ";" > > TuxFax:~ # echo 'select * from "Faxeingang" where > "Filename"="/ddf.tif/";'|psql VEIrx -U postgres > > ERROR: Attribute '/ddf.tif/' not found > > TuxFax:~ # echo 'select * from "Faxeingang" where > "Filename"=\"ddf.tif"\;'|psql VEIrx -U postgres > > invalid command \"ddf.tif" > > ERROR: parser: parse error at or near "" > > TuxFax:~ # echo 'select * from "Faxeingang" where > "Filename"=\"ddf.tif\";'|psql VEIrx -U postgres > > invalid command \"ddf.tif > > ERROR: parser: parse error at or near "" > > TuxFax:~ # echo "select * from "Faxeingang" where > "Filename"=\"ddf.tif\";"|psql VEIrx -U postgres > > ERROR: Relation "faxeingang" does not exist > > TuxFax:~ # echo 'select * from "Faxeingang" where > "Filename"=/"ddf.tif/";'|psql VEIrx -U postgres > > ERROR: Attribute 'ddf.tif/' not found > > TuxFax:~ # echo 'select * from "Faxeingang" where > "Filename"=/"ddf.tif"/;'|psql VEIrx -U postgres > > ERROR: parser: parse error at or near ";" > > TuxFax:~ # > > > > thank you very much for your Help! > > best regards! > rong -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com #