agora inbox for postgres@postgres.berkeley.edu
help / color / mirror / Atom feedFrom: Robert.Patrick@cs.cmu.edu
To: postgres@postgres.Berkeley.EDU
Cc: postgres@postgres.Berkeley.EDU
Subject: PQhost/PQport problems
Date: Sun, 28 Aug 1994 21:51:59 -0400 (EDT)
Message-ID: <IiMHwzu00hMd0XTKB0@cs.cmu.edu> (raw)
In-Reply-To: <9408261444.AA11539@behaim.faps.uni-erlangen.de>
References: <9408261444.AA11539@behaim.faps.uni-erlangen.de>
I am developing an application which needs to:
1.) connect to a database under the control of the postmaster running
on the same machine,
2.) disconnect from that database,
3.) connect to a database under the control of a postmaster running on
a different machine.
The way I attempted to accomplish this behavior was to use putenv() to
change the PGHOST and PGPORT environment variables.
The problem is that Postgres appears to ignore the environment
variables once PQhost and PQport are set and neither PQfinish() nor
PQsetdb() (which calls PQreset()) seem to clear these variables.
Any suggestions?
Robert
==============================================================================
To add/remove yourself to/from the POSTGRES mailing list: send mail with
the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU"
If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
a human will deal with it. DO NOT post to the "postgres" mailing list.
==============================================================================
reply
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: postgres@postgres.berkeley.edu
Cc: Robert.Patrick@cs.cmu.edu
Subject: Re: PQhost/PQport problems
In-Reply-To: <IiMHwzu00hMd0XTKB0@cs.cmu.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox