>  aman.verma at <a href="http://mcgill.ca">mcgill.ca</a>  wrote..<br>>If you use shp2pgsql to upload a shapefile with an attribute table that has a malformed integer <br>>(like a letter), shp2pgsql will not correct it, and the upload will fail.<br>
>Normally, I would view this as 'expected behaviour' (garbage in, garbage out). However, I have two <br>>reasons to believe that shp2pgsql should do the correction:<br>>1) ArcGIS, and other software that read the xBase format (DBF), interpret such malformed integers as 0. <br>
>There seem to be a lot of shape files floating around that have malformed integers in them, precisely <br>>because they appear to be working. Users may have a difficult time understanding why shp2pgsql keeps <br>>trying to upload 'g' when all they can see is '0'.<br>
<br>I think this is not a good strategy.<br><br>If there a mistake in the dbf the mistake must be reported, not hide resolving automatically it.<br>Otherwise the shapefile version became not-interoperability.<br>Just now often the gis user was speaken about "shapefile read from arcgis" or some other tools, as they was difference from other kind of shapefile.<br>
<br>I experience many situation where a shapefile send me from other users are wrong, and the user report me "but my tool read it so for me it is  ok."<br><br>This may be born many kinds of formats shapefiles difference each other.<br>
So the shapefile format "became an opinion", and every tool apply they specific changing to the format.<br>For example<br><br>what if a filed name was more then 10 character ?<br>what if a text field was more character of how much declared in the header ?<br>
what if a date field was filled with a number ?<br>and so on .....<br><br>Even in your case:<br><br>if the field numeric in the shapefile instead of be fill with numbers was filled with '1', '2', '3', etc...<br>
where the number are however not really numbers but text based, an action of importing always 0.<br>Will be more confusing. The user don't understand why a number (or simil-number) became a '0'.<br><br>Andrea.<br>
<br>-- <br>-----------------<br>Andrea Peri<br>. . . . . . . . . <br>qwerty àèìòù<br>-----------------<br><br>