I regularly need to unload some rows from tables, and load into different 
databases, sometimes on different hosts.  In simple cases, I can do 
something like:

         psql -At -d dbname -c "select from table where...."

Due to some embedded tabs and other anomalies in our data, we then have to 
pipe the output to a perl script that transforms the wierdness (like 
tabs/crlf).

pg_dump handles all this perfectly, but cannot be used because it dumps an 
entire table.
I read the code for pg_dump, and it appears it handles the problem by 
looking at every character, less than a " ", it converts to an octal character.

Has anyone considered hacking pg_dump so I could send it a "select 
....."?  If not, could I please put this on the wish list?

Naomi

-- CONFIDENTIALITY NOTICE --

This message is intended for the sole use of the individual and entity to whom it is 
addressed, and may contain information that is privileged, confidential and exempt 
from disclosure under applicable law. If you are not the intended addressee, nor 
authorized to receive for the intended addressee, you are hereby notified that you may 
not use, copy, disclose or distribute to anyone the message or any information 
contained in the message. If you have received this message in error, please 
immediately advise the sender by reply email, and delete the message. Thank you.

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to