Browse Source

v.in.ogr: declare missing values in string and date fields as NULL, not empty strings (merge from trunk https://trac.osgeo.org/grass/changeset/67516)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@67702 15284696-431f-4ddb-bdfa-cd5b030d7da7
Moritz Lennert 9 years ago
parent
commit
ca27219700
1 changed files with 2 additions and 2 deletions
  1. 2 2
      vector/v.in.ogr/main.c

+ 2 - 2
vector/v.in.ogr/main.c

@@ -1255,13 +1255,13 @@ int main(int argc, char *argv[])
 			else if (Ogr_ftype == OFTDate ||
 				 Ogr_ftype == OFTTime || 
 				 Ogr_ftype == OFTDateTime) {
-			    sprintf(buf, ", ''");
+			    sprintf(buf, ", NULL");
 			}
 #endif
 			else if (Ogr_ftype == OFTString ||
 			         Ogr_ftype == OFTStringList ||
 				 Ogr_ftype == OFTIntegerList) {
-			    sprintf(buf, ", ''");
+			    sprintf(buf, ", NULL");
 			}
 			else {
 			    /* column type not supported */