Re: COPY commands could use an enhancement.
Joel Burton <jburton@scw.org>
From: Joel Burton <jburton@scw.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alfred Perlstein <bright@wintelcom.net>, pgsql-hackers@postgresql.org
Date: 2001-04-30T22:17:44Z
Lists: pgsql-hackers
On Mon, 30 Apr 2001, Tom Lane wrote: > I think it'd be better to put effort into an external data translation > utility that can deal with column selection, data reformatting, CR/LF > conversion, and all those other silly little issues that come up when > you need to move data from one DBMS to another. Sure, we could make > the backend do some of this stuff, but it'd be more maintainable as a > separate program ... IMHO anyway. I think that pgaccess and pgadmin > already have some capability in this line, BTW. Real conversion should happen in userland. However, allowing people to COPY in a different order does prevent a userland tool from having to re-arrange a dump file. (Of course, really, with perl, re-ordering a dump file should take more than a few lines anyway.) Are there any generalized tools for re-ordering delimited columns, without having to use sed/perl/regexes, etc.? If people can point to some best practices/ideas, I'd be happy to turn them into a HOWTO. -- Joel Burton <jburton@scw.org> Director of Information Systems, Support Center of Washington