|
From: Holger H. <oz...@me...> - 2011-04-15 19:21:12
|
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 |