Is there any way to make a dump from a query?
select field1,field2 from table
Does it exist a shell command like pg_dump --QUERY myquery -f myfile?

Belated, but it looks this is another way (equivalent to Andy Shellam's)

cat >> query.txt
select field1,field2 from table
^D


1. psql $database > dumpfile < query.txt

or

2. Same, on the fly

psql $database > dumpfile <<_eof_
select field1,field2 from table
_eof_




Regards,

Ben K.
Developer
http://benix.tamu.edu


---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org

Reply via email to