Re: COPY commands could use an enhancement.

From: Joel Burton <jburton(at)scw(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alfred Perlstein <bright(at)wintelcom(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: COPY commands could use an enhancement.
Date: 2001-04-30 22:17:44
Message-ID: Pine.LNX.4.21.0104301804080.6719-100000@olympus.scw.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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(at)scw(dot)org>
Director of Information Systems, Support Center of Washington

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-04-30 22:41:28 Re: v7.1.1 branched and released on Tuesday ...
Previous Message Magnus Naeslund(f) 2001-04-30 22:13:49 Re: PQftype()