Re: ora2pg and invalid command \N

Поиск
Список
Период
Сортировка
От Julien Rouhaud
Тема Re: ora2pg and invalid command \N
Дата
Msg-id CAOBaU_YLSKHSQ6nQB5ouRA8BS2D0ff3SkG1Rova=KE1zVrE6Gw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: ora2pg and invalid command \N  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
On Fri, Mar 16, 2018 at 8:28 PM, Adrian Klaver
<adrian.klaver@aklaver.com> wrote:
> On 03/16/2018 11:36 AM, Charlin Barak wrote:
>>
>> 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.
>
>
> That should not be necessary:
>
> https://www.postgresql.org/docs/10/static/sql-copy.html
>
> "NULL
>
>     Specifies the string that represents a null value. The default is \N
> (backslash-N) in text format, and an unquoted empty string in CSV format.
> You might prefer an empty string even in text format for cases where you
> don't want to distinguish nulls from empty strings. This option is not
> allowed when using binary format."
>
>
> To  solve this is going to require more information. From my previous post:
>
> What was the complete command you used to generate the data file?
>
> Can we see the complete error?
>
> Also a section of the data file that contains the data that caused the
> error?

I pinged the original author, and he thinks it might be because of a
nested user defined type.  If that's the case, you should try with
current development version
(https://github.com/darold/ora2pg/archive/master.zip) where the issue
should be fixed.  If not, you should try to open an issue on
https://github.com/darold/ora2pg/issues.


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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: ora2pg and invalid command \N
Следующее
От: Victoria
Дата:
Сообщение: Re: Nvim as external editor in psql as Postgres root user - .vimrc(environment?) issue