On Wed, Jul 20, 2011 at 8:53 PM, Vibhor Kumar
<vibhor.kumar@enterprisedb.com> wrote:
> You can use STDOUT to pipe output to a shell command and STDIN to read input from shell command.
> Something like given below:
> psql -c "COPY mytable to STDOUT"|gzip >/home/tgl/mytable.dump.gz
>
> cat filename|psql -c "COPY mytable from STDIN;"
>
> OR psql -c "COPY mytable from STDIN;" < filename
nice one, that works great!
(zcat instead of cat, though)
--
"Patriotism is the conviction that your country is superior to all
others because you were born in it." -- George Bernard Shaw