X-Original-To: pgadmin-hackers@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id E85F8475FD9; Wed, 2 Apr 2003 08:44:27 -0500 (EST) Received: from mailrelay1.lrz-muenchen.de (mailrelay1.lrz-muenchen.de [129.187.254.101]) by postgresql.org (Postfix) with ESMTP id 8D806475F5F; Wed, 2 Apr 2003 08:44:23 -0500 (EST) Received: from [138.245.10.1] by mailout.lrz-muenchen.de; Wed, 2 Apr 2003 15:44:23 +0200 Message-Id: <004601c2f91d$f723c6c0$16e1f48a@IPSM7N> From: "rx" To: <"Undisclosed-Recipient:;"@postgresql.org> Subject: help for postgreSQL in shell Date: Wed, 2 Apr 2003 15:44:20 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0043_01C2F92E.BA56D5A0" 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=1.1 required=5.0 tests=BAYES_20,HTML_20_30,HTML_FONT_BIG,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/50 X-Sequence-Number: 1024 This is a multi-part message in MIME format. ------=_NextPart_000_0043_01C2F92E.BA56D5A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hallo, I have a question in postgreSQL. I need your help! I execute the psql as PostgreSQL 7.2 devel Documentation.=20 But there is an Error:"ERROR: Relation "faxeingang" does not exist". But the table "Faxeingang" is actually exist in Database "data" my system: SuSE Linux 8.0, PostgreSQL 7.2.2, bash. data is datebaseName. faxeingang is TableName. ---------------------------------------------------------------------------= ------------------------------------------- Under is my command: TuxFax:~ # echo "\x \\ select * from "Faxeingang";" | psql -U postgres data Expanded display is on. invalid command \ TuxFax:~ # echo "select * from "Faxeingang";" | psql -U postgres data ERROR: Relation "faxeingang" does not exist TuxFax:~ # echo "select * from Faxeingang;" | psql -U postgres data ERROR: Relation "faxeingang" does not exist TuxFax:~ # echo "select * from ""Faxeingang"";" | psql -U postgres data ERROR: Relation "faxeingang" does not exist TuxFax:~ # psql data -U postgres -c "select * from "Faxeingang"" ERROR: Relation "faxeingang" does not exist TuxFax:~ # psql data -U postgres -c "select * from Faxeingang" ERROR: Relation "faxeingang" does not exist TuxFax:~ # psql data -U postgres -c "select * from ""Faxeingang""" ERROR: Relation "faxeingang" does not exist TuxFax:~ #=20 ***************************************************************************= ********** PostgreSQL 7.2 devel Documentation psql Name psql -- PostgreSQL interactive terminal=20 Synopsis psql [option...] [dbname [username]] Description psql is a terminal-based front-end to PostgreSQL. It enables you to type in= queries interactively, issue them to PostgreSQL, and see the query results= . Alternatively, input can be from a file. In addition, it provides a numbe= r of meta-commands and various shell-like features to facilitate writing sc= ripts and automating a wide variety of tasks.=20 Options -c command --command command=20 Specifies that psql is to execute one command string, command, and then exi= t. This is useful in shell scripts.=20 command must be either a command string that is completely parsable by the = server (i.e., it contains no psql specific features), or it is a single bac= kslash command. Thus you cannot mix SQL and psql meta-commands. To achieve = that, you could pipe the string into psql, like this: echo "\x \\ select * = from foo;" | psql.=20 If "autocommit" is on, multiple queries in a single string are processed in= a single transaction.=20 ***************************************************************************= ******************************** thank you very very Much! rong rong.xie@stud.tum.de ------=_NextPart_000_0043_01C2F92E.BA56D5A0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Hallo,

I have a question in postgreSQL. I need your help!

I execute the psql as PostgreSQL 7.2 devel=20 Documentation.

But there is an Error:"ERROR: Relation "faxeingang" does not exist".

But the table "Faxeingang" is actually exist in Database "data"

my system: SuSE Linux 8.0, PostgreSQL 7.2.2, bash.

data is datebaseName.

faxeingang is TableName.

------------------------------------------------------------------------= ----------------------------------------------

Under is my command:

TuxFax:~ # echo "\x \\ select * from "Faxeingang";" | psql -U postgres= =20 data

Expanded display is on.

invalid command \

TuxFax:~ # echo "select * from "Faxeingang";" | psql -U postgres data

ERROR: Relation "faxeingang" does not exist

TuxFax:~ # echo "select * from Faxeingang;" | psql -U postgres data

ERROR: Relation "faxeingang" does not exist

TuxFax:~ # echo "select * from ""Faxeingang"";" | psql -U postgres data<= /P>

ERROR: Relation "faxeingang" does not exist

TuxFax:~ # psql data -U postgres -c "select * from "Faxeingang""

ERROR: Relation "faxeingang" does not exist

TuxFax:~ # psql data -U postgres -c "select * from Faxeingang"

ERROR: Relation "faxeingang" does not exist

TuxFax:~ # psql data -U postgres -c "select * from ""Faxeingang"""<= /P>

ERROR: Relation "faxeingang" does not exist

TuxFax:~ #

************************************************************= *************************
PostgreSQL 7.2 devel=20 Documentation

psql

Name

psql --  PostgreSQL interactive terminal

Synopsis

psql [option...]=20 [dbname [username]]

Description

psql is a terminal-based front-end to <= SPAN=20 class=3DPRODUCTNAME>PostgreSQL. It enables you to type in queries=20 interactively, issue them to PostgreSQL, a= nd see=20 the query results. Alternatively, input can be from a file. In addition, it= =20 provides a number of meta-commands and various shell-like features to facil= itate=20 writing scripts and automating a wide variety of tasks.

Options

-c command<= BR>--command command= =20

Specifies that psql is to execute one c= ommand=20 string, command, and then exit. This is= useful=20 in shell scripts.

command must be either a command str= ing=20 that is completely parsable by the server (i.e., it contains no psql specific features), or it is a single backs= lash=20 command. Thus you cannot mix SQL and psql meta-commands. To achieve that, you could p= ipe the=20 string into psql, like this: echo "\x \\ select * from foo;" | psql.

If "autocommit" is on, multiple queries in a = single=20 string are processed in a single transaction. 

************************************************************************= ***********************************

thank you very very Much!

rong

rong.xie@stud.tum.de

------=_NextPart_000_0043_01C2F92E.BA56D5A0--