After re-reading what I just wrote to Andreas about how compression of
COPY data would be better done outside the backend than inside, it
struck me that we are missing a feature that's fairly common in Unix
programs. Perhaps COPY ought to have the ability to pipe its output
to a shell command, or read input from a shell command. Maybe something
COPY mytable TO '| gzip >/home/tgl/mytable.dump.gz';
(I'm not wedded to the above syntax, it's just an off-the-cuff thought.)
Of course psql would need the same capability, since the server-side
copy would still be restricted to superusers.
You can accomplish COPY piping now through psql, but it's a bit awkward:
psql -c "COPY mytable TO stdout" mydb | gzip ...
Thoughts? Is this worth doing, or is the psql -c approach good enough?
regards, tom lane
pgsql-hackers by date
|Next:||From: Andrew Dunstan||Date: 2006-05-31 15:03:20|
|Subject: Re: Compile libpq with vc8|
|Previous:||From: Marko Kreen||Date: 2006-05-31 14:57:47|
|Subject: Re: [PATCH] Magic block for modules|