Re: ora2pg and invalid command \N

Поиск
Список
Период
Сортировка
От Charlin Barak
Тема Re: ora2pg and invalid command \N
Дата
Msg-id CAPrg5cYk4_-Psn39ib-mMiTE10a_f=-AN4EPpyApxzPn=nMVug@mail.gmail.com
обсуждение исходный текст
Ответ на Re: ora2pg and invalid command \N  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: ora2pg and invalid command \N
Список pgsql-general
Thanks for your response.

the NULL values from Oracle were indeed replaced by \N in the data output. How do I go about loading this file? I hope I do not have to temporary replace \N with a string in the flat file and then later update in Postgres.

Thanks. 

102     48299   50  C       3      \N 
103     48299   \N  G       3      45
...
... 

On Fri, Mar 16, 2018 at 2:06 PM, Pavel Stehule <pavel.stehule@gmail.com> wrote:


2018-03-16 18:12 GMT+01:00 Charlin Barak <charlinbarak@gmail.com>:
Hi,
I'm using ora2pg to migrate our Oracle database to Postgres. I was able to generate the data file using TYPE=COPY but when I attempted to load the file via psql, I got lots of "invalid command \N" errors. The resolution on the internet was not clear and was  not ora2pg related. How do I resolve this issue? Can someone provide some guidance?

\N is symbol for NULL. but \cmd are psql commands too. This behave means so psql lost synchronization and try to eval data like commands. psql import is tolerant - that means so source of this issue is lost usually. Try to import data with option ON_ERROR_STOP

 https://stackoverflow.com/questions/4480381/postgres-sql-fail-on-script-error

Regards

Pavel

Thanks.






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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Question on corruption (PostgreSQL 9.6.1)
Следующее
От: francis cherat
Дата:
Сообщение: RE: error 53200 out of memory