The 'precision' slot in cursor.description is always
0, even when it should be otherwise (in the case of
NUMERIC/DECIMAL fields, for example).
This is because the function XSQLDA2describe makes no
attempt to determine the precision, but always sets it
Unfortunately, the precision is not easily gleaned
from the XSQLDVAR structure (as is scale, for
instance). Instead, it appears necessary to query the
system tables in order to determine the field's
It seems a shame to waste computational effort
querying the system tables when the 'precision' figure
in cursor.description will not usually even be used;
perhaps there's an alternative?
Log in to post a comment.