Doug Homoelle <homoelle(at)ll(dot)mit(dot)edu> writes:
> res = PQexec(conn, "select blah blah blah");
> test_int=PQntuples(res);
> fprintf(stdout,"number of rows: %f\n",test_int);
> test_int=PQnfields(res);
> fprintf(stdout,"number of cols: %f\n",test_int);
If test_int is an integer, you want %d or %i in the format, not %f ...
regards, tom lane