Re: How to do pg_dump + pg_restore within Perl script?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kynn Jones <kynnjo(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to do pg_dump + pg_restore within Perl script?
Date: 2010-05-10 20:19:10
Message-ID: 16779.1273522750@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Kynn Jones <kynnjo(at)gmail(dot)com> writes:
> But I have not found a way for my script to provide a password when it
> runs commands like dropdb, createdb, and pg_restore with the "-h <REMOTE
> HOST>" flag. So I end up resorting to SSH-tunneling. This is what I'm
> trying to avoid.

You don't really want to embed a password in the script anyway.
Consider using a ~/.pgpass file, or look at non-password-based
authentication mechanisms.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tim Landscheidt 2010-05-10 20:19:14 Re: question about unique indexes
Previous Message Tom Lane 2010-05-10 20:09:09 Re: PostgreSQL 9.0 - support for RANGE value PRECEDING window functions