Re: using copy to load odd characters

Поиск
Список
Период
Сортировка
От Johnson, Shaunn
Тема Re: using copy to load odd characters
Дата
Msg-id 73309C2FDD95D11192E60008C7B1D5BB05FED9F4@snt452.corp.bcbsm.com
обсуждение исходный текст
Ответ на using copy to load odd characters  ("Johnson, Shaunn" <SJohnson6@bcbsm.com>)
Список pgsql-general

--howdy:

--to reiterate the problem, i am simply doing
--a copy of a text file into a table:

[snip example]

testdb> \copy t_test1 from '/var/tmp/results.txt' with delimiter as '|'

[/snip example]

--the problem was that there were ^@ characters in the file
--and PostgreSQL didn't / couldn't load the data and terminated
--the process.

--my solution was to split the large files and, with VI,
--removed the ^@ characters by hand.  the copy went
--as expected.

--i expected PostgreSQL to load the data, regardless
--of what was in the file.  i'm only saying i 'expected'
--this because i've loaded the same file into the same
--table structure as DB2 (also my source for this file)
--and Oracle 9 with no problem.  my apologies for assuming.

--i suppose my next question could be 'why couldn't
--PostgreSQL load characters like this into a table?'
--but it seems like the best thing for future events
--is to write a perl script to scan the text files and
--remove them before loading the data.

--thanks!

>Totally impossible to tell unless you tell us
>exactly what you are doing
>and what you expected out of it.

-X

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

Предыдущее
От: Harry Broomhall
Дата:
Сообщение: UPDATE and outer joins
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: install; readline error with 7.3.4