Re: Cryptic Error Message Importing Table Dump - Mailing list pgsql-general

From Rich Shepard
Subject Re: Cryptic Error Message Importing Table Dump
Date
Msg-id alpine.LNX.2.00.1109150617410.14093@salmo.appl-ecosys.com
Whole thread Raw
In response to Re: Cryptic Error Message Importing Table Dump  (Alban Hertroys <haramrae@gmail.com>)
Responses Re: Cryptic Error Message Importing Table Dump
List pgsql-general
On Thu, 15 Sep 2011, Alban Hertroys wrote:

> The text in the error is a tab character, so maybe you have an extra tab
> somewhere?

Alban,

   The column separators are tabs. I've checked a few rows above and below
the cited one and find only a single tab between columns.

> If not, perhaps the error is about the line after the one you showed us.
> If there isn't a terminator (\.) there, then reading the first 4 columns
> would probably succeed; they are type text from the looks of it, so ' '
> (tab) is a valid character for those fields, but not for the real type
> column after those.

   The table schema is:

CREATE TABLE chemistry (
     lab_nbr character varying(12),
     site_id character varying(16) NOT NULL,
     sample_date date NOT NULL,
     param character varying(32) NOT NULL,
     quant real,
     units character varying(12),
     qual boolean,
     easting numeric(13,6),
     northing numeric(13,6),
     remark character varying(2)
);

   Each row terminates with a \n; when the cursor is at the row end and I
press ctrl-f (move one character forward), the cursor is at the beginning of
the next line.

   I'm confused about your statement that a tab is not valid for the 'real'
column. There are tabs between that column and adjacent ones, but no tabs
within any text column (only one of which has multiple strings).

   Could the error be far from the reported line 47363 but that's where psql
stopped? I've not been able to think of a way to check the entire file for
an extra tab as the length of each column's content varies.

Still perplexed,

Rich

pgsql-general by date:

Previous
From: Reena
Date:
Subject: Type of value has a mismatch with column typeCouldn't store in viewimages_yn Column. Expected type is BitString.
Next
From: "Marc Mamin"
Date:
Subject: share nothing but reads cluster