Apparent Problem With NULL in Restoring pg_dump

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Apparent Problem With NULL in Restoring pg_dump
Date: 2011-09-15 17:31:13
Message-ID: alpine.LNX.2.00.1109151025460.14093@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2011-09-15 18:41:02 Re: Apparent Problem With NULL in Restoring pg_dump [UPDATE]
Previous Message Jeff Adams 2011-09-15 16:30:28 Remote connection shows localhost databases