Blank Numeric Column For INSERT - Mailing list pgsql-general

From Rich Shepard
Subject Blank Numeric Column For INSERT
Date
Msg-id alpine.LNX.2.00.1111231025540.28204@salmo.appl-ecosys.com
Whole thread Raw
Responses Re: Blank Numeric Column For INSERT  (Richard Broersma <richard.broersma@gmail.com>)
List pgsql-general
   I am trying to load 143K rows into a postgres-9.0.5 table from an ASCII
text file. The file consists of INSERT INTO ... statements and the VALUES
are comma delimited. One column is numeric (REAL), but ~10K rows have that
value missing, and postgres rejects the lines.

   The column does not have a NOT NULL constraint.

   The command line I use is 'psql -d <database_name> -f wq.sql'.

   Originally I had two commas in sequence since there were no values between
them. Next I tried a space between the two commas. I tried searching in the
9.0.5 manual for 'missing values', 'missing', and another term I don't
recall but found nothing.

   An example:

psql:wq.sql:8121: ERROR:  syntax error at or near ","
LINE 1: ...its) VALUES (214,'SW-6','1992-11-25','oil_grease', ,'mg/L');

   What is the approprate way to represent the missing column?

TIA,

Rich

pgsql-general by date:

Previous
From: Raghavendra
Date:
Subject: Re: In which catalog postgres Instance Crash time recorded ?
Next
From: AM
Date:
Subject: On naming attributes in a WITH clause