From: | Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net> |
---|---|
To: | PgSQL Novice ML <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: script |
Date: | 2002-05-24 13:02:03 |
Message-ID: | 1022245323.631.17.camel@rebel |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Fri, 2002-05-24 at 03:21, Annissa Melhenas wrote:
> Hi all,
> I'm new to postgreSQL,a dn I'd like to write a script that will insert all
> my entries (I have almost 800 000 entries)in a pgsql database.so, the
> question is : which script language can I use, and how do I use it (ie,
> how do I run it?)
> Thanks for your replies,
Look in the Novice Archives from earlier this week, for a
thread regarding the _exact_ same topic.
Question: what do your records look like? Is each field
delimited, or are they fixed-length? If they are delimited
(by tab, comma, etc.) and there are no double-quotes around
each field (or you can safely get rid of them with tr), then
the COPY will probably work great.
If you can't use COPY, then you must write a small program
(in the language of your choice) to massage the data before
INSERTing it. I use python, others perl and C.
--
+---------------------------------------------------------+
| Ron Johnson, Jr. Home: ron(dot)l(dot)johnson(at)cox(dot)net |
| Jefferson, LA USA http://ronandheather.dhs.org:81 |
| |
| "I have created a government of whirled peas..." |
| Maharishi Mahesh Yogi, 12-May-2002, |
! CNN, Larry King Live |
+---------------------------------------------------------+
From | Date | Subject | |
---|---|---|---|
Next Message | Ron Johnson | 2002-05-24 13:14:40 | Why sequential scan when there's a supporting index? |
Previous Message | Ron Johnson | 2002-05-24 12:48:56 | Re: discovering an index definition |