From: | Andrew Gould <andrewgould(at)yahoo(dot)com> |
---|---|
To: | "Peter E(dot) Chen" <pchen3(at)jhmi(dot)edu>, "Postgres \(General\)" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Question on populating tables . . . |
Date: | 2002-01-02 21:16:35 |
Message-ID: | 20020102211635.83511.qmail@web13409.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Yes, PostgreSQL can read a text file that uses ONE
delimiter. I think the tab delimiter is the default.
Unfortunately, if you have more than one delimiter, or
if your text values are enclosed in quotation marks,
you'll have to edit the data file prior to moving the
data.
Once the file is ready to go, create the table and use
the COPY command to insert the data.
Speed hint - If you're inserting a lot of data, you
may want to drop the table's index and recreate it
after inserting the data.
Best of luck,
Andrew Gould
--- "Peter E. Chen" <pchen3(at)jhmi(dot)edu> wrote:
> Hey All,
>
> Is there a way to populate a table using a
> tab-delimited file? This feature
> is available in MySQL and I'd like to know if it is
> possible with
> postgreSQL.
>
> Thanks.
>
> Peter
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com
From | Date | Subject | |
---|---|---|---|
Next Message | P.J. "Josh" Rovero | 2002-01-02 21:25:19 | Re: Question on populating tables . . . |
Previous Message | Jeffrey W. Baker | 2002-01-02 21:16:12 | Re: Question on populating tables . . . |