From: Scott Whitney <scott@journyx.com>
To: Raghavendra <raghavendra.rao@enterprisedb.com>
Cc: czezz <czezz@o2.pl>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: SQL statement form shell ?
Date: Wed, 27 Aug 2014 11:50:57 -0500 (CDT)
Message-ID: <232963146.1020276.1409158257691.JavaMail.zimbra@mail.int.journyx.com> (raw)
In-Reply-To: <CA+h6Ahh2AMPkW9=ghUX73pq8348dJr6cS9EK7rv-PUgJwKKqHA@mail.gmail.com>
References: <50235644.468fa51b.53fdf382.a46b@o2.pl>
<CA+h6AhgTd=eY7BD150TVgHcHjSADeCYUkQS6kSWN44WaMbWkPQ@mail.gmail.com>
<112eabb1.21891393.53fdf7dc.3a517@o2.pl>
<CA+h6Ahh2AMPkW9=ghUX73pq8348dJr6cS9EK7rv-PUgJwKKqHA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
Also, throughout this thread, you have given us 2 separate ports: 5472 and 5432 (default).
In _this_ example, you set the database to "postgres," not to "Server4," as well.
Then there's that whole "foo," versus "foo2," thing going on...
There are a lot of differences in what you have sent over the course of this thread.
I would back up, take a deep breath, and start over.
1) Connect to your database something like this:
psql ___name of database___
2) SELECT * from "foo2";
3) Does that work? Once you make that work, proceed to test from the command line like this:
psql ___name of database__ -c "SELECT * from \"foo2\" ; "
If you make 1 and 2 work, 3 should work. BUT ALL OF THE OPTIONS HAVE TO BE THE SAME.
You cannot select * from foo in steps 1 and 2 and select * from foo2 in step 3.
You cannot use port 5472 in step 1/2 and 5432 in step 3.
You cannot connect to the db postgres in steps 1/2 and another db in step 3.
That invalidates your process.
----- Original Message -----
> On Wed, Aug 27, 2014 at 8:53 PM, czezz < czezz@o2.pl > wrote:
> > Copy/Paste error. DB name should be: fm_db_Server4
>
>
> Did you set
> PGOPTIONS environment variable for that terminal for any specific schema
> which do not contain the table "foo"
> . Then you might hit the error
> -bash-4.1$ export PGOPTIONS="-c search_path=tester"
> -bash-4.1$ psql -p 5432 -d postgres -c "SELECT * FROM foo;"
> ERROR: relation "foo" does not exist
> LINE 1: SELECT * FROM foo;
> ^
>
> ---
> Regards,
> Raghavendra
> EnterpriseDB Corporation
> Blog: http://raghavt.blogspot.com/> > Dnia 27 sierpnia 2014 17:13 Raghavendra < raghavendra.rao@enterprisedb.com
> > >
> > napisał(a):
>
> > > fm_db_Server4
> >
>
Journyx, Inc.
7600 Burnet Road #300
Austin, TX 78757
www.journyx.com
p 512.834.8888
f 512.834.8858
Do you receive our promotional emails? You can subscribe or unsubscribe to those emails at http://go.journyx.com/emailPreference/e/4932/714
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: scott@journyx.com, raghavendra.rao@enterprisedb.com, czezz@o2.pl
Subject: Re: SQL statement form shell ?
In-Reply-To: <232963146.1020276.1409158257691.JavaMail.zimbra@mail.int.journyx.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox