> To nit-pick, this is a "useless use of cat". > > In UNIX-land, simple input redirection will work much better: > > psql [dbname and various options] < [filename]
Good point... to elaborate further, the reason I was in a piping mindset is that with a large database, it also makes sense to compress on the fly to avoid filesystem size limits, so I usually use this pair of commands for backup/restore: pg_dump dbname | gzip > dbdumpfile.gz gunzip -c dbdumpfile | psql dbname -Nick ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]