From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Charlin Barak <charlinbarak(at)gmail(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org >> PG-General Mailing List" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: ora2pg and invalid command \N |
Date: | 2018-03-16 18:06:38 |
Message-ID: | CAFj8pRA2WJ5P-phnY8DF-uf4LMJbMVNJeuZJ6AtvwBf9boudnA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
2018-03-16 18:12 GMT+01:00 Charlin Barak <charlinbarak(at)gmail(dot)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.
>
>
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2018-03-16 18:24:23 | Re: Question on corruption (PostgreSQL 9.6.1) |
Previous Message | Victoria | 2018-03-16 18:05:17 | Re: Nvim as external editor in psql as Postgres root user - .vimrc (environment?) issue |