Re: pg_dumpall from a script - Mailing list pgsql-general

From Luca Ferrari
Subject Re: pg_dumpall from a script
Date
Msg-id CAKoxK+6b4kwLm7M5n-foYNgOTeRWW59e4b9r2bpv=42V1borwg@mail.gmail.com
Whole thread Raw
In response to Re: pg_dumpall from a script  (James Sewell <james.sewell@lisasoft.com>)
Responses Re: pg_dumpall from a script
List pgsql-general
On Tue, Oct 22, 2013 at 7:20 AM, James Sewell <james.sewell@lisasoft.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
froma :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


pgsql-general by date:

Previous
From: BladeOfLight16
Date:
Subject: Re: pg_dumpall from a script
Next
From: Amit Langote
Date:
Subject: A client and server encoding question