pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: marcelo <marcelo.nicolet@gmail.com>
To: Scott Mead <scottm@openscg.com>
Cc: PostgreSQL General <pgsql-general@postgresql.org>
Subject: Re: mild modification to pg_dump
Date: Fri, 17 Nov 2017 18:56:45 -0300
Message-ID: <d3705b2a-8b4f-b1e0-6585-466766070e48@gmail.com> (raw)
In-Reply-To: <CAKq0gvJ1Xzi0zZQgnHwuwGV1yAdCy1L56sqRMQAnZZOpBqK-QQ@mail.gmail.com>
References: <83ed30b6-a397-9072-67e5-0bde83ce28b7@gmail.com>
	<CAKq0gvJ9uR9Yid=RaGXawHxYRF_JfRZ96Q9Hevk5gcp+dKH+jw@mail.gmail.com>
	<023dc0d6-8fa3-7217-cf5c-0e3131c3b8c2@gmail.com>
	<d9a6f716-405d-3943-1071-716fbc1fdfc4@hogranch.com>
	<214e4cff-f625-1bb1-4e26-942b07877bcc@gmail.com>
	<CAKq0gvJ1Xzi0zZQgnHwuwGV1yAdCy1L56sqRMQAnZZOpBqK-QQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>

Thank you, Scott.
That's happening me because incomplete docs reading.
Truly, I'm catched in a very big app, so I have no time to read all the 
docs.


On 17/11/17 18:31, Scott Mead wrote:
>
> On Fri, Nov 17, 2017 at 4:06 PM, marcelo <marcelo.nicolet@gmail.com 
> <mailto:marcelo.nicolet@gmail.com>> wrote:
>
>     I need to "emulate" the pg_dump code because the password prompt.
>     Years ago I write a program (for the QnX environment) that catched
>     some prompt and emulates the standard input. I don't like to do
>     that again.
>
>
> pg_dump can use an environment variable "PGPASSWORD" upon execution 
> (actually, all libpq programs can).  You could have a wrapper that 
> sets the environment variable and then executes pg_dump, this would 
> get you around that prompt.  Similarly, you could use the .pgpass file.
>
> https://www.postgresql.org/docs/9.5/static/libpq-envars.html
> https://www.postgresql.org/docs/9.5/static/libpq-pgpass.html
>
> --Scott
>
>
>
>     On 17/11/17 17:23, John R Pierce wrote:
>
>         On 11/17/2017 12:19 PM, marcelo wrote:
>
>             Sorry, I was not exact.
>             I don't need nor like to change pg_dump. Rather, based on
>             pg_dump code, I need to develop a daemon which can receive
>             a TCP message (from a privileged app) containing some
>             elements: the database to dump, the user under which do
>             that, and his password. (My apps are using that same data,
>             of course, encripted to the common users).
>
>
>
>         I would just fork pg_dump to do the actual dump rather than
>         try and incorporate its source code into your app.
>
>
>
>
>
>     -- 
>     Sent via pgsql-general mailing list (pgsql-general@postgresql.org
>     <mailto:pgsql-general@postgresql.org>)
>     To make changes to your subscription:
>     http://www.postgresql.org/mailpref/pgsql-general
>     <http://www.postgresql.org/mailpref/pgsql-general;
>
>
>
>
> -- 
> --
> Scott Mead
> Sr. Architect
> /OpenSCG <http://openscg.com>/
> http://openscg.com

view thread (14+ messages)  latest in thread

Message-ID: <d3705b2a-8b4f-b1e0-6585-466766070e48@gmail.com>
Permalink:  ../d3705b2a-8b4f-b1e0-6585-466766070e48@gmail.com/
Also on:    postgresql.org/message-id/d3705b2a-8b4f-b1e0-6585-466766070e48@gmail.com

 · 

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 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-general@postgresql.org
  Cc: marcelo.nicolet@gmail.com, scottm@openscg.com
  Subject: Re: mild modification to pg_dump
  In-Reply-To: <d3705b2a-8b4f-b1e0-6585-466766070e48@gmail.com>
  References: <83ed30b6-a397-9072-67e5-0bde83ce28b7@gmail.com> <CAKq0gvJ9uR9Yid=RaGXawHxYRF_JfRZ96Q9Hevk5gcp+dKH+jw@mail.gmail.com> <023dc0d6-8fa3-7217-cf5c-0e3131c3b8c2@gmail.com> <d9a6f716-405d-3943-1071-716fbc1fdfc4@hogranch.com> <214e4cff-f625-1bb1-4e26-942b07877bcc@gmail.com> <CAKq0gvJ1Xzi0zZQgnHwuwGV1yAdCy1L56sqRMQAnZZOpBqK-QQ@mail.gmail.com> <d3705b2a-8b4f-b1e0-6585-466766070e48@gmail.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