Return-Path: owner-postman Received: from localhost.Berkeley.EDU (localhost.Berkeley.EDU [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.9/8.6.3) with SMTP id SAA25856 for postgres-redist; Sun, 28 Aug 1994 18:52:52 -0700 Resent-From: POSTGRES mailing list Resent-Message-Id: <199408290152.SAA25856@nobozo.CS.Berkeley.EDU> X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost.Berkeley.EDU didn't use HELO protocol Sender: owner-postman@postgres.Berkeley.EDU X-Return-Path: owner-postman Received: from EIGER.EDRC.CMU.EDU (EIGER.EDRC.CMU.EDU [128.2.214.41]) by nobozo.CS.Berkeley.EDU (8.6.9/8.6.3) with SMTP id SAA25842 for ; Sun, 28 Aug 1994 18:52:51 -0700 Received: from Messages.8.5.N.CUILIB.3.45.SNAP.NOT.LINKED.EIGER.EDRC.CMU.EDU.pmax.mach via MS.5.6.EIGER.EDRC.CMU.EDU.pmax_mach; Sun, 28 Aug 1994 21:51:59 -0400 (EDT) Message-ID: Date: Sun, 28 Aug 1994 21:51:59 -0400 (EDT) From: Robert.Patrick@cs.cmu.edu To: postgres@postgres.Berkeley.EDU Subject: PQhost/PQport problems CC: postgres@postgres.Berkeley.EDU In-Reply-To: <9408261444.AA11539@behaim.faps.uni-erlangen.de> References: <9408261444.AA11539@behaim.faps.uni-erlangen.de> Resent-To: postgres-redist@postgres.Berkeley.EDU Resent-Date: Sun, 28 Aug 94 18:52:52 -0700 Resent-XMts: smtp 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. ==============================================================================