Re: Error in using copy command

Поиск
Список
Период
Сортировка
Искать
От
Michael Wood
Тема
Re: Error in using copy command
Дата
в 09:28:45
Msg-id
BANLkTi=LQAb_W860_O3XtgBjOrqTv2EAqg@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Error in using copy command Sindile Bidla <sindile.bidla@gmail.com>
Re: Error in using copy command Michael Wood <esiotrot@gmail.com>
Re: Error in using copy command Michael Wood <esiotrot@gmail.com>
Re: Error in using copy command Sindile Bidla <sindile.bidla@gmail.com>
Re: Error in using copy command Michael Wood <esiotrot@gmail.com>
Re: Error in using copy command Sindile Bidla <sindile.bidla@gmail.com>
On 11 May 2011 14:09, Sindile Bidla  wrote:
>
> I get the following error on running COPY - array value must start with "{"
> or dimension information CONTEXT: copy tablename, line 1, column field1:
> ""1"".
> the structure of the csv file is: "1","1","BLOEMSMOND SETTLEMENT
> AGRICULTURAL HOLDING","00000","","","T618/1943","6.3870 H","NORTHERN
> CAPE","","*"
> my copy command looks is: COPY tablename FROM myfile DELIMITER ',';

Try:

COPY tablename FROM 'myfile'
DELIMITER ','
CSV QUOTE '"' ESCAPE '\';

(ESCAPE might be wrong depending on what your CSV looks like if one of
the fields contains a " character.)

-- 
Michael Wood 
В списке pgsql-novice по дате отправления
От: Sindile Bidla
Дата:
Сообщение: Error in using copy command
От: Michael Wood
Дата:
FAQ