Using psql to feed a file line by line to a table column - Mailing list pgsql-general

From Alexander Farber
Subject Using psql to feed a file line by line to a table column
Date
Msg-id CAADeyWjAYmm=fjAh6kjXSAK-DqsQJ5vOhSd-isLaE6qY4Dq2Yg@mail.gmail.com
Whole thread Raw
Responses Re: Using psql to feed a file line by line to a table column
List pgsql-general
Hello,

I have a list of 400000 non-english words,
each on a separate line and in UTF8 format,
which I'd like to put in the "word" column
of the following table (also in UTF8 and 8.4.13):

create table good_words (
        word varchar(64) primary key,
        verified boolean not null default false,
        stamp timestamp default current_timestamp
);

Is there maybe a psql trick for that
(the "psql --help" doesn't mention
an "input field separator" option)?

Or do I have to write a Perl-script for that task?

Thank you
Alex


pgsql-general by date:

Previous
From: Steve Atkins
Date:
Subject: Re: Testing Technique when using a DB
Next
From: Ian Lawrence Barwick
Date:
Subject: Re: Using psql to feed a file line by line to a table column