I'm attempting to import a shapefile into postgis via shp2pgsql.
Among the fields in the shapefile's .dbf file is a date field with format yyyymmdd, which is a valid date format for postgresql.
However, the sql generated by shp2pgsql outputs the date field with quotes:
And that means when I run the command, I get an 'invalid input syntax' error:
What do I need to do to get shp2pgsql to format the value correctly so it can be loaded into my database? I need to automate this loading process, so anything that involves opening up the SQL and editing the file should be a last resort.
EDIT: Turns out it was a bad record causing the error. Of course an insert statement uses quotes around the values. I get stupid after midnight :)