Re: Question on populating tables . . . - Mailing list pgsql-general

From Andrew Gould
Subject Re: Question on populating tables . . .
Date
Msg-id 20020102211635.83511.qmail@web13409.mail.yahoo.com
Whole thread Raw
In response to Question on populating tables . . .  ("Peter E. Chen" <pchen3@jhmi.edu>)
List 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@jhmi.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

pgsql-general by date:

Previous
From: Brent Verner
Date:
Subject: Re: Case sensitivity question . . .
Next
From: "Jeffrey W. Baker"
Date:
Subject: Re: Question on populating tables . . .