dump a perl array into a psql DB via 'copy'; help?

Alex Beamish talexb-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Fri Dec 17 18:04:51 UTC 2004


On Thu, 16 Dec 2004 21:01:55 -0500, Taavi Burns <jaaaarel-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> wrote:
> On Wed, 15 Dec 2004 17:48:30 -0500, Alex Beamish <talexb-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> wrote:
> > We just discussed something similar on Perl Monks:
> >
> >   http://perlmonks.org/?node_id=414600
> >
> > My own contribution suggested using LOAD DATA INFILE or some variety
> > of bcp, the Bulk Copy Program, if available for your installation.
> 
> I was also looking for a LOAD command with psql, but found the COPY command
> instead, which sounded similar enough that I'm pretty sure it's the same thing.
> 
> If it's not the same thing, then psql should have some other utility
> for the purpose.

Yeah, sorry, LOAD DATA INFILE is MySQL's way of doing it, and
PostgreSQL uses COPY which does the same thing.

Any database needs to have a good way of bulk loading in data .. my
first experience with that was using Ingres, and they had a utility
called bcp, for bulk copy program.

Sometimes you just have to poke around the documentation to find these gems.

Alex
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list