X-Original-To: pgsql-docs@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id DD487475A45; Fri, 4 Apr 2003 07:28:06 -0500 (EST) Received: from mailrelay2.lrz-muenchen.de (mailrelay2.lrz-muenchen.de [129.187.254.102]) by postgresql.org (Postfix) with ESMTP id 8CFFE474E42; Fri, 4 Apr 2003 07:28:05 -0500 (EST) Received: from [138.245.10.1] by mailout.lrz-muenchen.de; Fri, 4 Apr 2003 14:28:04 +0200 Message-Id: <005e01c2faa5$a31056a0$16e1f48a@IPSM7N> From: "rx" To: "pgadmin-hackers" , , , , Subject: psql in shell Date: Fri, 4 Apr 2003 14:28:02 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_005B_01C2FAB6.6658C240" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam-Status: No, hits=3.9 required=5.0 tests=BAYES_20,HTML_10_20,HTML_FONT_BIG,SUSPICIOUS_RECIPS, WEIRD_QUOTING version=2.50 X-Spam-Level: *** X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/13 X-Sequence-Number: 1739 This is a multi-part message in MIME format. ------=_NextPart_000_005B_01C2FAB6.6658C240 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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, b= ash, 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 n= ame. 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=3D# select * from "Faxeingang" where "Filename"=3D'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 Erro= r. PS: VEIrx is database name. Faxeingang is table name. Filename is column n= ame. TuxFax:~ # echo 'select * from "Faxeingang" where "Filename"=3Dddf.tif;'|ps= ql VEIrx -U postgres ERROR: Relation "ddf" does not exist TuxFax:~ # echo 'select * from "Faxeingang" where "Filename"=3D'ddf.tif';'|= psql VEIrx -U postgres ERROR: Relation "ddf" does not exist TuxFax:~ # echo 'select * from "Faxeingang" where "Filename"=3D"ddf.tif";'|= psql VEIrx -U postgres ERROR: Attribute 'ddf.tif' not found TuxFax:~ # echo 'select * from "Faxeingang" where "Filename"=3D"'ddf.tif'";= '|psql VEIrx -U postgres ERROR: Attribute 'ddf.tif' not found TuxFax:~ # echo 'select * from "Faxeingang" where "Filename"=3D""ddf.tif"";= '|psql VEIrx -U postgres ERROR: zero-length delimited identifier TuxFax:~ # echo 'select * from "Faxeingang" where "Filename"=3D''ddf.tif'';= '|psql VEIrx -U postgres ERROR: Relation "ddf" does not exist TuxFax:~ # echo 'select * from "Faxeingang" where "Filename"=3D/ddf.tif/;'|= psql VEIrx -U postgres ERROR: parser: parse error at or near ";" TuxFax:~ # echo 'select * from "Faxeingang" where "Filename"=3D/ddf.tif/'|p= sql VEIrx -U postgres ERROR: parser: parse error at or near "" TuxFax:~ # echo 'select * from "Faxeingang" where "Filename"=3D/'ddf.tif'/;= '|psql VEIrx -U postgres ERROR: parser: parse error at or near ";" TuxFax:~ # echo 'select * from "Faxeingang" where "Filename"=3D'/ddf.tif/';= '|psql VEIrx -U postgres ERROR: parser: parse error at or near ";" TuxFax:~ # echo 'select * from "Faxeingang" where "Filename"=3D"/ddf.tif/";= '|psql VEIrx -U postgres ERROR: Attribute '/ddf.tif/' not found TuxFax:~ # echo 'select * from "Faxeingang" where "Filename"=3D\"ddf.tif"\;= '|psql VEIrx -U postgres invalid command \"ddf.tif" ERROR: parser: parse error at or near "" TuxFax:~ # echo 'select * from "Faxeingang" where "Filename"=3D\"ddf.tif\";= '|psql VEIrx -U postgres invalid command \"ddf.tif ERROR: parser: parse error at or near "" TuxFax:~ # echo "select * from "Faxeingang" where "Filename"=3D\"ddf.tif\";= "|psql VEIrx -U postgres ERROR: Relation "faxeingang" does not exist TuxFax:~ # echo 'select * from "Faxeingang" where "Filename"=3D/"ddf.tif/";= '|psql VEIrx -U postgres ERROR: Attribute 'ddf.tif/' not found TuxFax:~ # echo 'select * from "Faxeingang" where "Filename"=3D/"ddf.tif"/;= '|psql VEIrx -U postgres ERROR: parser: parse error at or near ";" TuxFax:~ # thank you very much for your Help! best regards! rong ------=_NextPart_000_005B_01C2FAB6.6658C240 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
 hallo,
 
Can you help me for my another question?
 
It work good as under in shell=20 without "where-condition" .

TuxFax:~ # echo 'select * from "Faxeingang";'|psq= l VEIrx=20 -U postgres

PS: VEIrx is database name. Faxeingang is tab= le=20 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=20 with "where-condition" .

PS: VEIrx is database name. Faxeingang is tab= le=20 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=3D# select * from "Faxeingang" where=20 "Filename"=3D'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=20 shell as under, come a Error.

PS: VEIrx is database name. Faxeingang is tab= le=20 name.  Filename is column name.

TuxFax:~ # echo 'select * from "Faxeingang" where=20 "Filename"=3Dddf.tif;'|psql VEIrx -U postgres

ERROR: Relation "ddf" does not exist

TuxFax:~ # echo 'select * from "Faxeingang" where=20 "Filename"=3D'ddf.tif';'|psql VEIrx -U postgres

ERROR: Relation "ddf" does not exist

TuxFax:~ # echo 'select * from "Faxeingang" where=20 "Filename"=3D"ddf.tif";'|psql VEIrx -U postgres

ERROR: Attribute 'ddf.tif' not found

TuxFax:~ # echo 'select * from "Faxeingang" where=20 "Filename"=3D"'ddf.tif'";'|psql VEIrx -U postgres

ERROR: Attribute 'ddf.tif' not found

TuxFax:~ # echo 'select * from "Faxeingang" where=20 "Filename"=3D""ddf.tif"";'|psql VEIrx -U postgres

ERROR: zero-length delimited identifier

TuxFax:~ # echo 'select * from "Faxeingang" where=20 "Filename"=3D''ddf.tif'';'|psql VEIrx -U postgres

ERROR: Relation "ddf" does not exist

TuxFax:~ # echo 'select * from "Faxeingang" where=20 "Filename"=3D/ddf.tif/;'|psql VEIrx -U postgres

ERROR: parser: parse error at or near ";"

TuxFax:~ # echo 'select * from "Faxeingang" where=20 "Filename"=3D/ddf.tif/'|psql VEIrx -U postgres

ERROR: parser: parse error at or near ""

TuxFax:~ # echo 'select * from "Faxeingang" where=20 "Filename"=3D/'ddf.tif'/;'|psql VEIrx -U postgres

ERROR: parser: parse error at or near ";"

TuxFax:~ # echo 'select * from "Faxeingang" where=20 "Filename"=3D'/ddf.tif/';'|psql VEIrx -U postgres

ERROR: parser: parse error at or near ";"

TuxFax:~ # echo 'select * from "Faxeingang" where=20 "Filename"=3D"/ddf.tif/";'|psql VEIrx -U postgres

ERROR: Attribute '/ddf.tif/' not found

TuxFax:~ # echo 'select * from "Faxeingang" where=20 "Filename"=3D\"ddf.tif"\;'|psql VEIrx -U postgres

invalid command \"ddf.tif"

ERROR: parser: parse error at or near ""

TuxFax:~ # echo 'select * from "Faxeingang" where=20 "Filename"=3D\"ddf.tif\";'|psql VEIrx -U postgres

invalid command \"ddf.tif

ERROR: parser: parse error at or near ""

TuxFax:~ # echo "select * from "Faxeingang" where=20 "Filename"=3D\"ddf.tif\";"|psql VEIrx -U postgres

ERROR: Relation "faxeingang" does not exist

TuxFax:~ # echo 'select * from "Faxeingang" where=20 "Filename"=3D/"ddf.tif/";'|psql VEIrx -U postgres

ERROR: Attribute 'ddf.tif/' not found

TuxFax:~ # echo 'select * from "Faxeingang" where=20 "Filename"=3D/"ddf.tif"/;'|psql VEIrx -U postgres

ERROR: parser: parse error at or near ";"

TuxFax:~ #

 

thank you very much for your Help!

best regards!
rong
------=_NextPart_000_005B_01C2FAB6.6658C240--