[GRASS-dev] [GRASS GIS] #2499: v.in.ogr in does not handle "nan" in attribute tables properly

#2499: v.in.ogr in does not handle "nan" in attribute tables properly
--------------------------+-----------------------------------------
  Reporter: sbl | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.8.3
Component: Vector | Version: unspecified
Resolution: | Keywords: v.in.ogr, DBMI, SQLite, nan
       CPU: Unspecified | Platform: Unspecified
--------------------------+-----------------------------------------

Comment (by sbl):

In addition, the different DMBS behave differently with regards to
nan/inf...

This is how PostgreSQL handles NaN / Inf in double columns:
{{{
CREATE TEMPORARY TABLE test_insert_nan (double_column double precision);
INSERT INTO test_insert_nan VALUES ('nan');
INSERT INTO test_insert_nan VALUES ('-nan');
INSERT INTO test_insert_nan VALUES ('inf');
INSERT INTO test_insert_nan VALUES ('-inf');
SELECT * FROM test_insert_nan;
}}}

{{{
double_column
double precision
"NaN"
"NaN"
"Infinity"
"-Infinity"
}}}

{{{
SELECT * FROM test_insert_nan WHERE double_column > 0;
}}}

{{{
double_column
double precision
"NaN"
"NaN"
"Infinity"
}}}

{{{
SELECT * FROM test_insert_nan WHERE double_column < 0;
}}}

{{{
double_column
double precision
"-Infinity"
}}}

However, in PostgreSQL does not insert nan / inf strings columns of type
numeric...

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2499#comment:13&gt;
GRASS GIS <https://grass.osgeo.org>