Re: [GENERAL] COPY with default values won't work? - Mailing list pgsql-general

From Brett W. McCoy
Subject Re: [GENERAL] COPY with default values won't work?
Date
Msg-id Pine.LNX.4.04.9903240707140.17016-100000@dragosani.lan2wan.com
Whole thread Raw
In response to Re: [GENERAL] COPY with default values won't work?  (Charles Tassell <ctassell@isn.net>)
List pgsql-general
On Wed, 24 Mar 1999, Charles Tassell wrote:

> @#$#!!  Any way to make COPY use default, or shove a lot of data in with a
> single INSERT query?  According to older messages in the mailing list, it
> is *possible*, but I can't get it to work.
>
> My problem is that I might be using this to put a few thousand entries in
> the db every night, and when I last attempted this using a few thousand
> insert statements, it was awfully slow (on the order of taking HOURS)

You could write a perl script to read the data column by column frm the
text file and insert it into the databse using the Pg module.

Brett W. McCoy
                                        http://www.lan2wan.com/~bmccoy/
-----------------------------------------------------------------------
Quantum Mechanics is God's version of "Trust me."

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GAT dpu s:-- a C++++ UL++++$ P+ L+++ E W++ N+ o K- w--- O@ M@ !V PS+++
PE Y+ PGP- t++ 5- X+ R+@ tv b+++ DI+++ D+ G++ e>++ h+(---) r++ y++++
------END GEEK CODE BLOCK------


pgsql-general by date:

Previous
From: Matthew Hixson
Date:
Subject: PAM module for Postgres?
Next
From: Herouth Maoz
Date:
Subject: Re: [GENERAL] COPY with default values won't work?