X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id B4A0711F6263 for ; Mon, 10 Apr 2006 13:53:22 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: 1.56 X-Spam-Level: * X-Spam-Status: No, score=1.56 required=5 tests=[AWL=-0.360, DNS_FROM_RFC_ABUSE=0.479, DNS_FROM_RFC_POST=1.44, HTML_MESSAGE=0.001, MSGID_FROM_MTA_HEADER=0] Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id vQ3fBWYSH1HQ for ; Mon, 10 Apr 2006 13:52:57 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from hotmail.com (bay101-dav12.bay101.hotmail.com [64.4.56.84]) by postgresql.org (Postfix) with ESMTP id F099111F6D57 for ; Mon, 10 Apr 2006 13:52:57 -0300 (ADT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Mon, 10 Apr 2006 09:52:53 -0700 Message-ID: Received: from 70.56.247.248 by BAY101-DAV12.phx.gbl with DAV; Mon, 10 Apr 2006 16:52:50 +0000 X-Originating-IP: [70.56.247.248] X-Originating-Email: [michaelmschmidt@msn.com] X-Sender: michaelmschmidt@msn.com From: "Michael Schmidt" To: "Markus Schaber" Cc: "PostgreSQL JDBC" References: <443A31FE.5050209@logix-tt.com> Subject: Re: Re; pg_dump from Java Date: Mon, 10 Apr 2006 10:52:51 -0600 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0043_01C65C8C.E9AE7820" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: MSN 9 X-MimeOLE: Produced By MSN MimeOLE V9.20.0026.0800 Seal-Send-Time: Mon, 10 Apr 2006 10:52:51 -0600 X-OriginalArrivalTime: 10 Apr 2006 16:52:53.0149 (UTC) FILETIME=[356D1CD0:01C65CBF] X-Archive-Number: 200604/78 X-Sequence-Number: 15012 This is a multi-part message in MIME format. ------=_NextPart_000_0043_01C65C8C.E9AE7820 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Markus, Thanks for the info about these environment variables - pretty handy = stuff! However, it seems a possible drawback in using them is that they = could compromise cross-platform compatibility. Also, there was mention = that PGPASSWORD could pose security issues on some systems. As I have = it set up now, the user enters the password into the application on the = first database access and it is stored for the duration of the session = only. =20 Michael Schmidt > 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.=20 Maybe you can also use the appropriate environmental variable to pass the password to pg_dump, it should work for all libpq based = applications=B9. http://www.postgresql.org/docs/8.1/interactive/libpq-envars.html This should work even nicer than parsing stdout / stderr. HTH, Markus =B9 Exception is debian, they put wrappers into the path which don't honour those variables, and do their own magic. --=20 Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in EU! www.ffii.org = www.nosoftwarepatents.org ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match ------=_NextPart_000_0043_01C65C8C.E9AE7820 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Markus,
 
Thanks for the info about these environment variables - pretty = handy=20 stuff!  However, it seems a possible drawback in using them is = that=20 they could compromise cross-platform compatibility.  Also, there = was=20 mention that PGPASSWORD could pose security issues on some = systems.  As I=20 have it set up now, the user enters the password into the application on = the=20 first database access and it is stored for the duration of the session=20 only. 
 
Michael Schmidt
 
> I've continued to work on the problem (stubbornness + free = time is=20 a
> deadly combination) and have gotten a solution others might=20 find
> helpful.  In Java 1.5 (5.0 per their new numbering) = there is a=20 new
> ProcessBuilder class.  It is a different way to create = a=20 runtime process
> that allows setting environmental variables.=20

Maybe you can also use the appropriate environmental variable to = pass
the password to pg_dump, it should work for all libpq based=20 applications=B9.

http://www.postgresql.org/docs/8.1/interactive/libpq-envars.html
=
This=20 should work even nicer than parsing stdout /=20 stderr.



HTH,
Markus

=B9 Exception is debian, = they put=20 wrappers into the path which don't
honour those variables, and do = their own=20 magic.
--
Markus Schaber | Logical Tracking&Tracing = International=20 AG
Dipl. Inf.     | Software Development = GIS

Fight=20 against software patents in EU! www.ffii.org www.nosoftwarepatents.org

---------------------------(end=20 of broadcast)---------------------------
TIP 9: In versions below = 8.0, the=20 planner will ignore your desire = to
      =20 choose an index scan if your joining column's datatypes do=20 not
       = match
------=_NextPart_000_0043_01C65C8C.E9AE7820--