[GRASS-dev] [GRASS GIS] #2343: GRASS 7: "inf" values break insert statements in v.rast.stats
GRASS GIS
trac at osgeo.org
Thu Jun 19 04:36:55 PDT 2014
#2343: GRASS 7: "inf" values break insert statements in v.rast.stats
--------------------------+-------------------------------------------------
Reporter: sbl | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Python | Version: svn-releasebranch70
Keywords: v.rast.stats | Platform: All
Cpu: All |
--------------------------+-------------------------------------------------
Comment(by glynn):
Replying to [ticket:2343 sbl]:
> "inf" breaks the INSERT statement and results in an DBMI error "no such
column: inf", which at the end crashes v.rast.stats.
>
> Just like "nan", "inf" could be replaced by NULL.
FWIW, PostgreSQL supports infinity and NaN values, e.g.
{{{
CREATE TABLE test ( value REAL ) ;
INSERT INTO test VALUES (REAL 'Infinity');
INSERT INTO test VALUES (REAL '+Infinity');
INSERT INTO test VALUES (REAL '-Infinity');
INSERT INTO test VALUES (REAL 'NaN');
SELECT * FROM test ;
value
-----------
Infinity
Infinity
-Infinity
NaN
(4 rows)
}}}
I don't know whether this is part of the SQL standard, or whether it is
supported by the other back-ends. It won't work for columns of type
NUMERIC.
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2343#comment:2>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list