[GRASS-dev] string madness

Glynn Clements glynn at gclements.plus.com
Sat Mar 17 17:59:12 EDT 2007


Markus Neteler wrote:

> g.gisenv set=DEBUG=3
> echo "SELECT * from zecche_BL2001_gis WHERE comune='Zoldo Alto' ORDER BY datacens" | db.select

> D2/3: col: datacens, nkcols 13, litetype : 2, sqltype 6

> "datacens" is the column in question.

	http://www.sqlite.org/cvstrac/fileview?f=sqlite/src/sqlite.h.in&v=1.198
says:
	#define SQLITE_INTEGER  1
	#define SQLITE_FLOAT    2
	/* #define SQLITE_TEXT  3  // See below */
	#define SQLITE_BLOB     4
	#define SQLITE_NULL     5

IOW, litetype == SQLITE_FLOAT, sqltype == DB_SQL_TYPE_DOUBLE_PRECISION.

If DBMI thinks that the column contains a float, trying to parse
YYYY-MM-DD as a float is going to fail.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list