delimeters psql /CSV

Поиск
Список
Период
Сортировка
От
Тема delimeters psql /CSV
Дата
Msg-id 785199B14156764C8EB14EF96CEDC44EE041CA@xw-exch03.lfv.se
обсуждение исходный текст
Ответы Re: delimeters psql /CSV  (Ron <ronljohnsonjr@gmail.com>)
Re: delimeters psql /CSV  ("Daniel Verite" <daniel@manitou-mail.org>)
Список pgsql-general

Hi, I have a problem with psql and CSV.

 

C:\Users\an\bin>C:\Tmp\psql -h 10.211.43.22 -p 5432 -U postgres -d aatest -w  -c  "\copy public.""Bayern"" FROM 'C:\Users\an\test\Bayern.csv' WITH DELIMITER ';' CSV"

Error:  extra data after expected last column

CONTEXT:  COPY Bayern, row 1: "48.455555555555556;11.800833333333333;Anglberg/Amper;Industrial plant;722;220;220;2133;0;0;Undefined..."

 

I have a table (Bayern) with all columns in the right format. There is a column-value which has a ‘/’ in the string (Anglberg/Amper). I think that ‘/’ is taken for a delimeter, since when I replace / with ‘white space‘ it works.

I use ‘;’ as delimeter. I have UTF-8 encoding in the db. Is there a way around this or do I have to go through all csv files and change ‘/’ to white space?

 

Kind regards,

Paul

В списке pgsql-general по дате отправления:

Предыдущее
От: Kostis Michail
Дата:
Сообщение: Re: Snowball Stemming Greek support not included in Release 12 beta
Следующее
От: Adrien Nayrat
Дата:
Сообщение: Re: Snowball Stemming Greek support not included in Release 12 beta