TS> the COPY command is the sorriest excuse for a data load tool i have
TS> ever had the displeasure of working with.
COPY was never intended as a data format conversion tool. It started out
as a quick & dirty tool for saving and restoring database contents.
It's accreted a few frammishes over the years, notably the user-settable
delimiter option, but basically it's still designed to read files that it
wrote itself.
I agree with Tony that a separate tool for format conversions would be
mighty handy. I don't think that trying to load down COPY with more
features is an appropriate approach --- let it do what it does well,
namely database backup and restore. But we do need something that can
handle the layout and data-conversion tasks needed to import data from
other DBMSes.
regards, tom lane