Re: Re; pg_dump from Java

From: Markus Schaber <schabi(at)logix-tt(dot)com>
To: Michael Schmidt <michaelmschmidt(at)msn(dot)com>
Cc: PostgreSQL JDBC <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Re; pg_dump from Java
Date: 2006-04-10 10:22:54
Message-ID: 443A31FE.5050209@logix-tt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Markus Riehl 2006-04-10 15:11:15 No automatic reconnect after network error
Previous Message Peter Eisentraut 2006-04-10 09:35:00 Re: Prepared statement leak