pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Pundt <mlists@rp-online.de>
To: pgsql-admin@postgresql.org
Cc: Alvaro Herrera <alvherre@commandprompt.com>
Cc: A.Burbello <burbello3000@yahoo.com.br>
Subject: Re: Dump database more than 1 flat file
Date: Tue, 18 Dec 2007 12:08:13 +0100
Message-ID: <200712181208.13449.mlists@rp-online.de> (raw)
In-Reply-To: <20071218010511.GE24103@alvh.no-ip.org>
References: <dcc563d10712171404tdb8b2e0h4f166d483c27d0cc@mail.gmail.com>
	<110808.75802.qm@web36204.mail.mud.yahoo.com>
	<20071218010511.GE24103@alvh.no-ip.org>

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.pundt@rp-online.de> ---- http://rp-online.de/ ----



view thread (15+ messages)  latest in thread

Message-ID: <200712181208.13449.mlists@rp-online.de>
Permalink:  ../200712181208.13449.mlists@rp-online.de/
Also on:    postgresql.org/message-id/200712181208.13449.mlists@rp-online.de

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: mlists@rp-online.de, alvherre@commandprompt.com, burbello3000@yahoo.com.br
  Subject: Re: Dump database more than 1 flat file
  In-Reply-To: <200712181208.13449.mlists@rp-online.de>

* 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