Cryptic Error Message Importing Table Dump

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Cryptic Error Message Importing Table Dump
Date: 2011-09-15 01:42:20
Message-ID: alpine.LNX.2.00.1109141833570.4384@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Now that I fixed the rows that had the inadvertent newlines in one column,
I'm trying to read in the fixed table from the .sql file produced by
pg_dump. I know there are duplicate rows now that I removed the newlines,
and those are easily fixed (although the reported line numbers don't match
what I see in emacs). There is, however, one problem that I don't understand
so I can't find the row and fix it. Here's what psql reports:

\i /<full-path-to-file>/chemistry.sql
SET
SET
SET
SET
SET
SET
SET
SET
SET
CREATE TABLE
ALTER TABLE
psql:/<full-path-to-file>/chemistry.sql:47475:
ERROR: invalid input syntax for type real: " "
CONTEXT: COPY chemistry, line 47363, column quant: " "

Line 47475 is below the last line with content in the file. Line 47363
contains:

96-A000890 SC 1996-04-23 Conductance, Specific 394
uS/cm t \N \N \N

(which is wrapped here, but not in the emacs buffer). There are 10 columns,
which is how many there should be. When I go to the end of the line there's
no space or other extraneous character. The column 'quant' contains the
number 394. While that's an integer, the column domain is real and psql
doesn't complain about other whole numbers in that column.

Please help me understand what the error message and context are telling
me because I just don't see it.

Rich

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2011-09-15 02:56:16 Re: Noob help for charting on web site, need assistance
Previous Message Andy Colson 2011-09-15 01:26:32 Re: Noob help for charting on web site, need assistance