Re: pg_dumpall from a script

From: Luca Ferrari <fluca1978(at)infinito(dot)it>
To: James Sewell <james(dot)sewell(at)lisasoft(dot)com>
Cc: Raghu Ram <raghuchennuru(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_dumpall from a script
Date: 2013-10-22 06:41:34
Message-ID: CAKoxK+6b4kwLm7M5n-foYNgOTeRWW59e4b9r2bpv=42V1borwg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Oct 22, 2013 at 7:20 AM, James Sewell <james(dot)sewell(at)lisasoft(dot)com> wrote:

> I need a way to backup either from SQL in PSQL (possibly \!) or from a PG/PLSQL function to a file with a name set from a :variable.

Could it be something like this:

# \setenv myFile 'filename'
# \! pg_dump > $myFile

Unfortunately there seems to be no unsetenv command to remove the
variable within the script.

Luca

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Amit Langote 2013-10-22 08:21:20 A client and server encoding question
Previous Message BladeOfLight16 2013-10-22 06:07:44 Re: pg_dumpall from a script