help with COPY from .csv file into database - Mailing list pgsql-novice

From mike
Subject help with COPY from .csv file into database
Date
Msg-id 410F81C6.5060107@floog.net
Whole thread Raw
In response to Significant trailing spaces  (Steve Tucknott <steve@retsol.co.uk>)
Responses Re: help with COPY from .csv file into database
List pgsql-novice
I am getting started with Postgres and cannot copy a database that was
converted to a .csv file into my postgres database titled TEST_DB.

TEST_DB=> \d
        List of relations
 Schema |  Name   | Type  | Owner
--------+---------+-------+-------
 public | matters | table | floog
(1 row)

I have completed the copy command trying to move data from the .csv file
into TEST_DB like so:

COPY matters FROM /home/floog/TEST_DB.csv;

But I don't think the data transferred properly because when I try to
look at any column or row I get the following:

TEST_DB=> select * from matters;
 client_1_lastname | client_1_firstname | client_1_address |
client_1_phone | client_2_lastname | client_2_firstname |
client_2_address |
client_2_phone | carrier_name | claim_rep | claim_num | responsible |
supervisory | second | client_num | matter_num | file_name |
adverse_1_lastname | adverse_1_firstname | adverse_2_lastname |
adverse_2_firstname | adverse_3_lastname | adverse_3_firstname |
other_party_lastname | other_party_firstname | case_type | billing_type
| date_of_loss | judicial_district | date_open | date_close

-------------------+--------------------+------------------+----------------+-------------------+--------------------+------------------+----------------+---------

-----+-----------+-----------+-------------+-------------+--------+------------+------------+-----------+--------------------+---------------------+------------

--------+---------------------+--------------------+---------------------+----------------------+-----------------------+-----------+--------------+--------------+-
------------------+-----------+------------
(0 rows)

I can open up and view the .csv file using an OpenOffice spreadsheet.
I'm thinking maybe I have to copy one column at a time from the .csv
file to the postgres database.
How do I copy something like column A, B, C, etc. from the .csv file to
TEST_DB client_1_lastname | client_1_firstname | client_1_address | etc.
etc.

Thank you for your time and patience.

Mike

pgsql-novice by date:

Previous
From: Gaetano Mendola
Date:
Subject: Re: Comparing database schema's
Next
From: Rafael Charnovscki
Date:
Subject: Re: inserting multiple rows