[QGIS-trac] [Quantum GIS] #3335: SPIT converts null dates to
invalid values
Quantum GIS
qgis at qgis.org
Tue Dec 14 09:36:56 EST 2010
#3335: SPIT converts null dates to invalid values
------------------------------------------------+---------------------------
Reporter: arencambre | Owner: borysiasty
Type: bug | Status: new
Priority: major: does not work as expected | Milestone: Version 1.7.0
Component: Python plugins and bindings | Version: 1.6.0
Keywords: | Platform_version: 7 x86
Platform: Windows | Must_fix: No
Status_info: 0 |
------------------------------------------------+---------------------------
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'''.
--
Ticket URL: <http://trac.osgeo.org/qgis/ticket/3335>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats
More information about the QGIS-trac
mailing list