Re: COPY commands could use an enhancement. - Mailing list pgsql-hackers

From Joel Burton
Subject Re: COPY commands could use an enhancement.
Date
Msg-id Pine.LNX.4.21.0104301804080.6719-100000@olympus.scw.org
Whole thread Raw
In response to Re: COPY commands could use an enhancement.  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: PQftype()
Next
From: Tom Lane
Date:
Subject: Re: v7.1.1 branched and released on Tuesday ...