Re: Dump database more than 1 flat file

From: Thomas Pundt <mlists(at)rp-online(dot)de>
To: pgsql-admin(at)postgresql(dot)org
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, "A(dot)Burbello" <burbello3000(at)yahoo(dot)com(dot)br>
Subject: Re: Dump database more than 1 flat file
Date: 2007-12-18 11:08:13
Message-ID: 200712181208.13449.mlists@rp-online.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,

On Dienstag, 18. Dezember 2007, Alvaro Herrera wrote:
| A.Burbello wrote:
| > If doesn't have another way, how can I put the
| > "header" in the begin of file without open?
| > With "cat >>" command I put in the end.
|
| Don't -- you can put the header in a separate file and do something like
|
| (cat header-file ; cat split-1 ; cat tail-file ) | psql

even simpler: "cat" usually takes any number of file name arguments,
so usually you simply can do

cat header-file split-1 tail-file | psql

No need for parentheses and starting a new process for each file.

Ciao,
Thomas

--
Thomas Pundt <thomas(dot)pundt(at)rp-online(dot)de> ---- http://rp-online.de/ ----

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message David F. Skoll 2007-12-18 17:49:19 Warm-standby robustness question
Previous Message Milen A. Radev 2007-12-18 09:00:54 Re: Querying