Re: Data loading from a flat file...

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Data loading from a flat file...
Дата
Msg-id 20060106054846.GA88946@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: Data loading from a flat file...  (Angshu Kar <angshu96@gmail.com>)
Ответы Re: Data loading from a flat file...  (Angshu Kar <angshu96@gmail.com>)
Список pgsql-general
On Thu, Jan 05, 2006 at 11:04:16PM -0600, Angshu Kar wrote:
> Thanks Jim. the statement is running without any error but nothing is
> getting copied into the table!

What client are you using and what's the exact command you ran?
Does the command finish or does it never return?  How much data
is there?  What version of PostgreSQL are you using and on what
platform?

> Also, my data file is showing some ^M chars like
>
> B1^M   C1^M   E1
> B2^M   C2^M   E2

The ^M sequence might represent a carriage return -- how are you
viewing the file to see these characters?  Are they between fields
as shown or only at the ends of lines?

> Is it creating any trouble for the COPY command?

Possibly; you might need to massage the data if you can't get COPY
to read it.  That should be an easy job for a script (somebody here
can probably help).

> And can we use INSERT with COPY?

To use INSERT you'd need to read the data and generate the appropriate
INSERT commands; that's another scripting job.

--
Michael Fuhr

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

Предыдущее
От: Andrew - Supernews
Дата:
Сообщение: Re: Adding another primary key to a populated table
Следующее
От: Daniel Kunkel
Дата:
Сообщение: Re: Adding another primary key to a populated table