Trouble w/ COPY command

From: Wells Oliver <wellsoliver(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Trouble w/ COPY command
Date: 2012-04-14 22:45:47
Message-ID: CAOC+FBUmbk9RhTZTFTULBhKMGQcXfhVEqjEeqJ7PChgk3kdLRQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I have CSV files blowing up because they have double quotes around numeric
values: " 1.34" yields ERROR: invalid input syntax for type numeric: "
1.34"

And occasionally these are empty, and you see invalid syntax for type
numeric: " "

Are there flags I can pass to COPY to avoid this? There are properly quoted
string values elsewhere in the final, so I'm reticent to strip out double
quote characters or anything.

Thank you.

--
Wells Oliver
wellsoliver(at)gmail(dot)com

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Greg Williamson 2012-04-14 23:17:07 Re: Trouble w/ COPY command
Previous Message raghu ram 2012-04-14 17:38:54 Re: invalid byte sequence for encoding "UTF8": 0xf481 - how could this happen?