Error Importing CSV File - Mailing list pgsql-general

From Bryan Nelson
Subject Error Importing CSV File
Date
Msg-id CAF9KfT_Uox=4zVqdCBUwjPrpYmHKDfw8GPSHxBi=7UxL3cZh=A@mail.gmail.com
Whole thread Raw
Responses Re: Error Importing CSV File  (Adrian Klaver <adrian.klaver@gmail.com>)
Re: Error Importing CSV File  (Susan Cassidy <scassidy@edgewave.com>)
Re: Error Importing CSV File  (Susan Cassidy <scassidy@edgewave.com>)
Re: Error Importing CSV File  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Error Importing CSV File  (Steve Crawford <scrawford@pinpointresearch.com>)
List pgsql-general
I am having problems importing a CSV file of sample data for testing
in a web app.

Columns & Types
-------------------
zip_code - text
lattitude - float8
longitude - float8
city - text
state - text
county - text

Some Sample Data From CSV File
------------------------------
96799,-7.209975,-170.7716,PAGO PAGO,AS,AMERICAN SAMOA
96941,7.138297,151.503116,POHNPEI,FM,FEDERATED STATES OF MICRO
96942,7.138297,151.503116,CHUUK,FM,FEDERATED STATES OF MICRO

COPY Command
------------
COPY geo_data FROM 'geo_data2.csv' DELIMITERS ',' CSV;

Error Message
-------------
ERROR: invalid input syntax for integer: "96799"
CONTEXT: COPY geo_data, line 1, column id: "96799"

I can't figure out why it keeps choking with "invalid syntax for
integer" since the field was created as "text".

Any and all help greatly appreciated!

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: C function returns null values
Next
From: Adrian Klaver
Date:
Subject: Re: Error Importing CSV File