Re: [sqlite] Leading/trailing whitespace overrides Numeric type affinity - workarounds ?

2009-01-23 Thread MikeW
Roger Binns writes: > > > MikeW wrote: > > I guess one approach would be to compile with SQLITE_ENABLE_COLUMN_METADATA > > and then to read the column type from there rather than from > > sqlite3_column_type(). > > Or just call sqlite3_column_decltype - >

Re: [sqlite] Leading/trailing whitespace overrides Numeric type affinity - workarounds ?

2009-01-22 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 MikeW wrote: > I guess one approach would be to compile with SQLITE_ENABLE_COLUMN_METADATA > and then to read the column type from there rather than from > sqlite3_column_type(). Or just call sqlite3_column_decltype -

Re: [sqlite] Leading/trailing whitespace overrides Numeric type affinity - workarounds ?

2009-01-22 Thread MikeW
Roger Binns writes: > > > MikeW wrote: > > I note that in the codebase, sqlite3IsNumber() will return False if an > > otherwise numeric value has leading and/or trailing whitespace, > > *overriding the table schema*. > > Such is dynamic typing ! > > Your dynamic typing statement

Re: [sqlite] Leading/trailing whitespace overrides Numeric type affinity - workarounds ?

2009-01-22 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 MikeW wrote: > I note that in the codebase, sqlite3IsNumber() will return False if an > otherwise numeric value has leading and/or trailing whitespace, > overriding the table schema. > Such is dynamic typing ! Your dynamic typing statement is wrong.

[sqlite] Leading/trailing whitespace overrides Numeric type affinity - workarounds ?

2009-01-22 Thread MikeW
In determining the type of a value returned from a SELECT in some generic SQLite code, an implementation uses sqlite3_column_type to check a field type. I note that in the codebase, sqlite3IsNumber() will return False if an otherwise numeric value has leading and/or trailing whitespace,