Re: Help with copy (loading TSV file into table as text)

Поиск
Список
Период
Сортировка
Искать
От
Raymond O'Donnell
Тема
Re: Help with copy (loading TSV file into table as text)
Дата
Msg-id
4EA5CAB8.2090106@iol.ie
Ответ на
Список
Дерево обсуждения
Help with copy (loading TSV file into table as text) Allan Kamau <kamauallan@gmail.com>
Re: Help with copy (loading TSV file into table as text) Raymond O'Donnell <rod@iol.ie>
Re: Help with copy (loading TSV file into table as text) Allan Kamau <kamauallan@gmail.com>
Re: Help with copy (loading TSV file into table as text) Raymond O'Donnell <rod@iol.ie>
Re: Help with copy (loading TSV file into table as text) "Albe Laurenz" <laurenz.albe@wien.gv.at>
On 24/10/2011 20:23, Allan Kamau wrote:
> Hi,
> I have a tab delimited file with over a thousand fields (columns)
> which I would like to import into postgreSQL.
> 
> I have opted to import the entire record (line) of this file into a
> single field in a table, one table record per file line. Later split
> the contents of the field accordingly into an array for further
> processing and decomposition.
> 
> I am using the COPY command as follows
> #COPY a.t(raw_data)FROM '/data/tmp/t.txt';
> 
> and it reports "ERROR:  extra data after last expected column".

I'd guess that there's a character in the input which PG is interpreting
as a column delimiter. Use the WITH DELIMITER option to set the expected
delimiter to something that won't appear in the input.

Ray.


-- 
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie
В списке pgsql-general по дате отправления
От: Szymon Guz
Дата:
Сообщение: strange java query behaviour
От: Allan Kamau
Дата:
FAQ