[PyGreSQL] inserttable() NULL problem

Ryan Sobash Ryan.Sobash at noaa.gov
Wed Sep 12 13:39:16 EDT 2007


I am having an issue inserting NULL values into a database using the 
inserttable() method.

The data are being entered into a column of type double precision. I 
have entered NULLs into it using the query() method, but want to take 
advantage of the increased speed of the inserttable() method.

I have tried various strings to indicate a NULL value: "None", "\N", 
"False", "NULL". This is the error I receive:

ERROR:  invalid input syntax for type double precision: "False"
CONTEXT:  COPY test_ver_data_ndfd, line 1, column bri: "False"
('test_ver_data_ndfd' being the table name and 'bri' being the column name).

Any guidance would be appreciated. I would prefer to not use an UPDATE 
statement to change the columns to NULL (as this would eliminate the 
inserttable() performance gains).

----------------------------------------------------------
Ryan Sobash
Meteorological Developer - National Weather Service
Silver Spring, MD
ryan.sobash at noaa.gov


More information about the PyGreSQL mailing list