I am quite new to postgre.
I need to access postgre databases via c++ using the c-api libpq.
So far everything was working. I can read fields of type varchar from tables, but I have investigated a problem when I try to read fields of type int4 (for instance).
When I read using the function PQgetvalue() it returns an empty string though the field is filled. When I call PQfformat() on an int4 row it tells me that the row contains binary data.
Is that correct and can someone tell me how to read the data correctly?
Hi, Karim,thanks for your answer.
I got a little bit further. I am not dealing with large objects. I am dealing with fields of type int4 (or integer).
Are you familiar with the libpq?
It is just that when I call PQgetvalue() on a text field I get the correct result. When I do this on an integer field I get an empty (non null) result.