CSV file - Using COPY Command - Double-Quotes

From: Walter <pgsql(at)thejohnsonplace(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: CSV file - Using COPY Command - Double-Quotes
Date: 2005-12-06 17:01:02
Message-ID: 4395C3CE.1050607@thejohnsonplace.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I have a problem using the copy command on a CSV file.

All of the values within the CSV are surrounded with quotation marks. So
a null value for a field looks like ""

I am trying to import the file and no matter what I do, it hits a null
date field and says

invalid input syntax for type date : ""

How do I get the copy command to simply enter a null value for the "" it
finds for the date field in the CSV file?

BTW - None of my fields are set as "NOT NULL". They can all accept null
values.

Please help.

Walter
PG Noob

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Fuhr 2005-12-06 17:16:56 Re: Musings on Triggers
Previous Message A. Kretschmer 2005-12-06 16:36:45 Re: Musings on Triggers