Hi all,

I am using the pgsql driver, and run a query for a field "length" in a
table called "read". Field 'length' has been declared as "integer" in
postgresql.

This is what I run through libdbi:
"select SUM(length) of read;"

I suppose the result will be integer also. So I do:
dbi_result_get_field_type_idx(data,1);
and the result is 1. AFAIK that's integer.

Now I do:
int rr;
rr = dbi_result_get_int_idx(data,1);

and it'll be 0. Which is wrong of course.

Calling the same query on postgresql's console is some 200.000 bytes.

Calling the dbi error function after this call gives:
"-7: The requested variable type does not match what libdbi thinks it
should be"

If I read strings through libdbi, all is fine, so I am wondering what is
wrong here.

Holger


------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
libdbi-devel mailing list
libdbi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-devel

Reply via email to