Opened 13 years ago
Last modified 13 years ago
#3335 new bug
SPIT converts null dates to invalid values
Reported by: | arencambre | Owned by: | timlinux |
---|---|---|---|
Priority: | major: does not work as expected | Milestone: | Version 1.7.0 |
Component: | C++ Plugins | Version: | 1.6.0 |
Keywords: | Cc: | aren@… | |
Must Fix for Release: | No | Platform: | Windows |
Platform Version: | 7 x86 | Awaiting user input: | no |
Description
If I have a shapefile with a DBF that has null values in the date column, SPIT translates these null dates to an invalid 0000/00/00 value. For example, this error:
Problem inserting features from file: C:/[redacted]/TxDOT_Roadways.shp The database gave an error while executing this SQL: INSERT INTO "public"."TxDOT_Roadways"("OBJECTID","STRATMAP_I","RTE_NM",... (rest of SQL trimmed) The error was: ERROR: date/time field value out of range: "0000/00/00" LINE 1: ...0','058AA0353','AA','353',NULL,'353','2010/12/01','0000/00/0...
If I use shp2pgsql.exe instead, the date gets translated to NULL in the INSERT INTO statements.
If you want to reproduce, download TxDOT Roadways 2010 at http://www.tnris.state.tx.us/datadownload/download.jsp and import TxDOT_Roadways.shp.
Change History (1)
comment:1 by , 13 years ago
Component: | Python plugins and bindings → C++ Plugins |
---|---|
Owner: | changed from | to
Note:
See TracTickets
for help on using tickets.