Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XMuw5-0005G2-5r for pgsql-admin@arkaria.postgresql.org; Thu, 28 Aug 2014 08:20:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XMuw4-00021H-6F for pgsql-admin@arkaria.postgresql.org; Thu, 28 Aug 2014 08:20:00 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XMuw1-000218-VD for pgsql-admin@postgresql.org; Thu, 28 Aug 2014 08:19:58 +0000 Received: from moh1-ve3.go2.pl ([193.17.41.134]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XMuvx-0004Kg-Pq for pgsql-admin@postgresql.org; Thu, 28 Aug 2014 08:19:56 +0000 Received: from moh1-ve3.go2.pl (unknown [10.0.0.134]) by moh1-ve3.go2.pl (Postfix) with ESMTP id 1138E665E3F; Thu, 28 Aug 2014 10:19:42 +0200 (CEST) Received: from o2.pl (unknown [10.0.0.4]) by moh1-ve3.go2.pl (Postfix) with SMTP; Thu, 28 Aug 2014 10:19:42 +0200 (CEST) Subject: =?UTF-8?Q?Re:__SQL_statement_form_shell?= =?UTF-8?Q?_=3F?= From: =?UTF-8?Q?czezz?= To: =?UTF-8?Q?Scott_Whitney?=, =?UTF-8?Q?Scott_Whitney?= Cc: pgsql-admin@postgresql.org, raghavendra.rao@enterprisedb.com, payal@omniti.co In-Reply-To: <1040409514.1017500.1409153403592.JavaMail.zimbra@mail.int.journyx.com> References: <50235644.468fa51b.53fdf382.a46b@o2.pl> <1040409514.1017500.1409153403592.JavaMail.zimbra@mail.int.journyx.com> Mime-Version: 1.0 Message-ID: <6bc90f73.12c57c82.53fee61d.853f@o2.pl> Date: Thu, 28 Aug 2014 10:19:41 +0200 X-Originator: 46.140.133.82 Content-Type: multipart/alternative; boundary="==o2.pl-WebMail-55d19244.4268b042.8548==" X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org --==o2.pl-WebMail-55d19244.4268b042.8548== Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, I=20think=20I=20got=20it. It=20seems=20that=20I=20need=20to=20indicate=20specific=20user=20name=20a= nd=20only=20then=20the=20query=20works. -bash-4.1$=20psql=20-p=205472=20-d=20fm=5Fdb=5FServer4=20-U=20msuper=20-c= =20"SELECT=20*=20FROM=20foo2;" Im=20new=20to=20postgresql=20but=20I=20guess=20-U=20(user)=20also=20someh= ow=20defines=20tablespace=20where=20specific=20table=20is=20created. Anyway,=20thank=20you=20all=20for=20your=20help=20and=20answers. Cheers, czezz Dnia=2027=20sierpnia=202014=2017:30=20Scott=20Whitney=20<scott@journyx= .com>=20napisa=C5=82(a): There=20are=20a=20few=20things=20I=20would=20check.=C2=A0a)=C2=A0psql=20-= p=205472=20-d=20fm=5Fdb=5FServer4b)=20SELECT=20*=20from=20foo2;c)=20Do=20= those=20=5F2=5F=20statements=20work=20separately?=20That=20should=20prove= =20that=20you're=20talking=20to=20the=20exact=20same=20connection/host/po= rt=20you=20expect.d)=C2=A0psql=20-p=205472=20-d=20fm=5Fdb=5FServer4=20-c=20= "SELECT=20*=20FROM=20foo2;=C2=A0So,=20step=20a&b=20succeed,=20but=20s= tep=20d=20fails?=C2=A0d)=C2=A0psql=20-p=205472=20-d=20fm=5Fdb=5FServer4e)= =20SELECT=20*=20from=20"foo2"; =C2=A0If=20this=20doesn't=20work,=20"foo2,"=20is=20not=20a=20valid=20rela= tion.=20It's=20case-sensitive=20or=20some=20such.=20Once=20you=20can=20ma= ke=20the=20table=20name=20work=20within=20"=20"=20marks,=20THEN=20try=20f= rom=20the=20command=20prompt=20like:=C2=A0f)=C2=A0psql=20-p=205472=20-d=20= fm=5Fdb=5FServer4=20-c=20"SELECT=20*=20FROM=20\"foo2\"=20;=20"=C2=A0=C2=A0= Im=20trying=20to=20execute=20simple=20query=20in=20shell. This=20query=20works=20OK=20in=20PSQL=20client: Server4=3D#=20SELECT=20*=20FROM=20foo2; =C2=A0However,=20for=20some=20reason=20I=20cannot=20execute=20it=20in=20s= hell.=20I=20try=20it=20like=20following: =C2=A0-bash-4.1$=20psql=20-p=205472=20-d=20fm=5Fdb=5FServer4=20-c=20"SELE= CT=20*=20FROM=20foo2;" ERROR:=20=C2=A0relation=20"foo2"=20does=20not=20exist LINE=201:=20SELECT=20*=20FROM=20foo2; =C2=A0=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0= =20=C2=A0=20=C2=A0=20=C2=A0^ =C2=A0Any=20ideas=20what=20Im=20doing=20wrong=20? =C2=A0BR, czezz =C2=A0 -- Sent=20via=20pgsql-admin=20mailing=20list=20(pgsql-admin@postgresql.org) To=20make=20changes=20to=20your=20subscription: http://www.postgresql.org/mailpref/pgsql-admin=C2=A0 =C2=A0Journyx,=20Inc.7600=20Burnet=20Road=20#300 Austin,=20TX=2078757 www.journyx.com=C2=A0p=20512.834.8888=C2=A0f=20512-834-8858=C2=A0=C2=A0Do= =20you=20receive=20our=20promotional=20emails?=20You=20can=20subscribe=20= or=20unsubscribe=20to=20those=20emails=20here.=C2=A0 --==o2.pl-WebMail-55d19244.4268b042.8548== Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi,I=20think=20I=20got=20it.It=20seems=20that=20I=20need=20= to=20indicate=20specific=20user=20name=20and=20only=20then=20the=20query=20= works.-bash-4.1$=20psql=20-p=205472=20-d=20fm=5Fdb=5FServer4=20-U= =20msuper=20-c=20"SELECT=20*=20FROM=20foo2;"Im=20new=20to= =20postgresql=20but=20I=20guess=20-U=20(user)=20also=20somehow=20defines=20= tablespace=20where=20specific=20table=20is=20created.Anyway,=20th= ank=20you=20all=20for=20your=20help=20and=20answers.Cheer= s,czezzDnia=2027=20sierpnia=202014=2017:3= 0=20Scott=20Whitney=20<scott@journyx.com>=20napisa=C5=82(a):
There=20are=20a=20few=20things=20I=20would=20check.
=C2=A0
a)=C2=A0psql=20-p=205472=20-d=20fm=5Fdb=5FServer4
b)=20SELECT=20*=20from=20foo2;
c)=20Do=20those=20=5F2=5F=20statements=20work=20separately?=20That=20= should=20prove=20that=20you're=20talking=20to=20the=20exact=20same=20conn= ection/host/port=20you=20expect.
d)=C2=A0psql=20-p=205472=20-d=20fm=5Fdb=5FServer4=20-c=20"SELECT=20*=20FRO= M=20foo2;
=C2=A0
So,=20step=20a&b=20succeed,=20but=20step=20d=20fails?
=C2=A0
d)=C2=A0psql=20-p=205472=20-d=20fm=5Fdb=5FServer4
e)=20SELECT=20*=20from=20"foo2";
=C2=A0
If=20this=20doesn't=20work,=20"foo2,"=20is=20not=20a=20valid=20relat= ion.=20It's=20case-sensitive=20or=20some=20such.=20Once=20you=20can=20mak= e=20the=20table=20name=20work=20within=20"=20"=20marks,=20THEN=20try=20fr= om=20the=20command=20prompt=20like:
=C2=A0
f)=C2=A0psql=20-p=205472=20-d=20fm=5Fdb=5FServer4=20-c=20"SELECT=20*=20FRO= M=20\"foo2\"=20;=20"
=C2= =A0
=C2= =A0
Im=20trying=20to=20e= xecute=20simple=20query=20in=20shell.This=20query=20works=20OK=20= in=20PSQL=20client:Server4=3D#=20SELECT=20*=20FROM=20foo2;
=C2=A0
However,=20for=20some=20reason=20I=20cannot=20execute=20it=20in=20shell.=20= I=20try=20it=20like=20following:
=C2=A0
-bash-4.1$=20psql=20-p=205472=20-d=20fm=5Fdb=5FServer4=20-c=20"SELECT=20*= =20FROM=20foo2;"ERROR:=20=C2=A0relation=20"foo2"=20does=20not=20e= xistLINE=201:=20SELECT=20*=20FROM=20foo2;=C2=A0=C2=A0=20=C2= =A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0= =20=C2=A0^
=C2=A0
Any=20ideas=20what=20Im=20doing=20wrong=20?
=C2=A0
BR,czezz
=C2=A0
--Sent=20via=20pgsql-admin=20mailing=20list=20(pgsql-admi= n@postgresql.org)To=20make=20changes=20to=20your=20subscription:<= br=20/>http://www.postgresql.org/mailpref/pgsql-admin
=C2=A0
=C2=A0
Journyx,=20Inc.
7600=20Burnet=20Road=20#300Austin,=20TX=2078757www.j= ournyx.com
=C2=A0
p=20512.834.8888=C2=A0
f=20512-834-8858=C2=A0
=C2=A0
Do=20you=20receive=20our=20prom= otional=20emails?=20You=20can=20subscribe=20or=20unsubscribe=20to=20those= =20emails=20here.=C2=A0
--==o2.pl-WebMail-55d19244.4268b042.8548==--