pg_dump & SQL statements

From: Naomi Walker <nwalker(at)eldocomp(dot)com>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: pg_dump & SQL statements
Date: 2003-09-25 17:01:04
Message-ID: 5.1.0.14.2.20030925092700.02636890@imap.eldocomp.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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.

Browse pgsql-admin by date

  From Date Subject
Next Message Donald Fraser 2003-09-25 17:24:42 Re: Case Insensitive comparison
Previous Message Gaetano Mendola 2003-09-25 15:10:37 Re: Actual function name