Ok. I still didn't try this. The problem is that I'm working under WinXP =
and have not installed MSVC. My co-worker is using MinGW, but I have to =
ask him how it works to reompile these.
Thanks anyway. I'm a little busy now till the end of next week, so I'll =
try it after this period.
Erny
----- Original Message -----=20
From: "Sebastien Bigaret" <sbi...@us...>
To: "Ernesto Revilla" <er...@si...>
Cc: "modeling-users" <mod...@li...>
Sent: Thursday, September 18, 2003 7:32 PM
Subject: Re: [Modeling-users] Sqlite numeric types returnes as strings
>=20
> A very, very quick answer: try to modify _sqlite.c
> in pysqlite, around l.1169 you'll find:
>=20
> else if (strstr(type_name, "FLOAT"))
> {
> type_code =3D tc_FLOAT;
> }
>=20
> Replace it with:
>=20
> else if (strstr(type_name, "FLOAT")
> || strstr(type_name, "NUMERIC"))
> {
> type_code =3D tc_FLOAT;
> }
>=20
>=20
> and you'll get the expected behaviour for NUMERIC types. Other types =
can be
> added the same way. I'll request for the necessary additions probably =
late this
> evening.
>=20
> Regards,
>=20
> -- S=E9bastien.
>=20
>=20
> > pysqlite 4.3.0
> >=20
> > Ok, I've checked it out
> > * good types: ['integer', 'int', 'int4', 'smallint', 'int2', =
'bigint',
> > 'int8', 'float4', 'float8']
> >=20
> > * bad types ['real', 'double precision', 'double', 'numeric',
> > 'numeric(15)', 'numeric(15,5)', 'decimal', 'decimal(15)',
> > 'decimal(15,5)']
> >=20
> > I got the types from postgres (I know, that not all are ANSI SQL 92, =
but
> > a lot of them are.)
> > I've sent a bug report to pysqlite @ sf.
> >=20
> > If anyone ones the test procedure used, let me know.
> >=20
> > Best regards,
> > Erny
>
|