Explicit NULL for no INTEGER data?

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Explicit NULL for no INTEGER data?
Date: 2011-02-18 22:55:52
Message-ID: alpine.LNX.2.00.1102181453070.30932@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a data file I want to copy into a table. The column name and
attribute is:

depth_seal INTEGER

one of the rows in the .csv file I want to bring into the table has no value
for this column, but there is no explicit NULL in the text file. When I try
to copy the file psql complains:

ERROR: invalid input syntax for integer: ""
CONTEXT: COPY water_well, line 1, column depth_seal: ""

Do I need an explicit NULL in that column?

Rich

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Johnston 2011-02-18 22:57:53 Re: constraining chars for all cols of a table
Previous Message Gauthier, Dave 2011-02-18 22:45:38 Re: constraining chars for all cols of a table