From: Markus Schaber <schabi@logix-tt.com>
To: Michael Schmidt <michaelmschmidt@msn.com>
Cc: PostgreSQL JDBC <pgsql-jdbc@postgresql.org>
Subject: Re: Re; pg_dump from Java
Date: Mon, 10 Apr 2006 12:22:54 +0200
Message-ID: <443A31FE.5050209@logix-tt.com> (raw)
In-Reply-To: <BAY101-DAV121FD09B38064071710341A3CC0@phx.gbl>
References: <BAY101-DAV121FD09B38064071710341A3CC0@phx.gbl>
Hi, Michael,
Michael Schmidt wrote:
> I've continued to work on the problem (stubbornness + free time is a
> deadly combination) and have gotten a solution others might find
> helpful. In Java 1.5 (5.0 per their new numbering) there is a new
> ProcessBuilder class. It is a different way to create a runtime process
> that allows setting environmental variables.
Maybe you can also use the appropriate environmental variable to pass
the password to pg_dump, it should work for all libpq based applications¹.
http://www.postgresql.org/docs/8.1/interactive/libpq-envars.html
This should work even nicer than parsing stdout / stderr.
HTH,
Markus
¹ Exception is debian, they put wrappers into the path which don't
honour those variables, and do their own magic.
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: schabi@logix-tt.com, michaelmschmidt@msn.com
Subject: Re: Re; pg_dump from Java
In-Reply-To: <443A31FE.5050209@logix-tt.com>
References: <BAY101-DAV121FD09B38064071710341A3CC0@phx.gbl> <443A31FE.5050209@logix-tt.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