I'm trying to load a shapefile into a PostGIS database, using shp2pgsql and 
psql.

It's failing because a couple of the sql insert statements have date fields 
containing '0'.

ERROR:  date/time field value out of range: "0"
HINT:  Perhaps you need a different "datestyle" setting.

What I need is for these features to be inserted with NULL date fields, instead 
of '0'.

Currently, I'm running psql on the generated .sql file, capturing the output.  
I then search the output to identify the problem statement, delete it from the 
generated file, and then run psql on it again, until there are no errors.  I 
save the lines I deleted in another file, and then hand-edit them, and insert 
them separately.

This is tiresome, tedious, and slow.

Anyone have any better ideas?

_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to