Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.osgeo.org/grass/grass/trunk@70280 15284696-431f-4ddb-bdfa-cd5b030d7da7
  • Loading branch information
landam committed Jan 6, 2017
1 parent ac5c14a commit d78e8d3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion db/drivers/ogr/describe.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ int describe_table(OGRLayerH hLayer, dbTable **table, cursor *c)
ogrType = OGR_Fld_GetType(hFieldDefn);
fieldName = OGR_Fld_GetNameRef(hFieldDefn);

if (ogrType != OFTInteger && ogrType != OFTInteger64 && ogrType != OFTReal &&
if (ogrType != OFTInteger &&
#if GDAL_VERSION_NUM >= 2000000
ogrType != OFTInteger64 &&
#endif
ogrType != OFTReal &&
ogrType != OFTString && ogrType != OFTDate &&
ogrType != OFTTime && ogrType != OFTDateTime ) {
G_warning(_("OGR driver: column '%s', OGR type %d is not supported"),
Expand Down Expand Up @@ -171,13 +175,17 @@ int describe_table(OGRLayerH hLayer, dbTable **table, cursor *c)

switch (ogrType) {
case OFTInteger:
#if GDAL_VERSION_NUM >= 2000000
case OFTInteger64:
#endif
sqlType = DB_SQL_TYPE_INTEGER;
size = OGR_Fld_GetWidth(hFieldDefn); /* OK ? */
precision = 0;
#if GDAL_VERSION_NUM >= 2000000
if (ogrType == OFTInteger64)
G_warning(_("Column '%s' : type int8 (bigint) is stored as integer (4 bytes) "
"some data may be damaged"), fieldName);
#endif
break;

case OFTReal:
Expand Down

0 comments on commit d78e8d3

Please sign in to comment.