Re: Apparent Problem With NULL in Restoring pg_dump

Поиск
Список
Период
Сортировка
От Andy Colson
Тема Re: Apparent Problem With NULL in Restoring pg_dump
Дата
Msg-id 4E724C80.3030201@squeakycode.net
обсуждение исходный текст
Ответ на Apparent Problem With NULL in Restoring pg_dump  (Rich Shepard <rshepard@appl-ecosys.com>)
Ответы Re: Apparent Problem With NULL in Restoring pg_dump
Re: Apparent Problem With NULL in Restoring pg_dump
Список pgsql-general
On 9/15/2011 12:31 PM, Rich Shepard wrote:
> The .sql file produced by pg_dump is properly terminated with '\.' as the
> last line, yet I continue to encounter this error:
>
> ERROR: invalid input syntax for type real: " "
> CONTEXT: COPY chemistry, line 47363, column quant: " "
>
> when trying to re-create the table.
>
> It appears that this error is generated when a row has a missing value in
> the 'quant' column and the column contains '\N' in the text file. For
> example,
>
> \N GW-22 2005-03-09 Depth to Water \N Feet \N
> \N \N \N
>
> (It is a single line in emacs but wraps in alpine.)
>
> Is there a different way for me to represent NULL in this text file?
> Replacing \N with NULL produces the same error.
>
> I'm not certain that this line is the real source of the problem but I'm
> quite confident that it is the one throwing the error.
>
> Rich
>


Can you pg_dump again, but use --inserts?  Maybe it'll offer some hints.

Also, do you have the right line endings for your os?

To restore, you are using:  psql dbname < filename
correct?

-Andy

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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Remote connection shows localhost databases
Следующее
От: Guillaume Lelarge
Дата:
Сообщение: Re: how to use all the options of EXPLAIN?