This function executes a query (as opposed to a command) against the database. The given proc is called with three arguments, which are respectively, the query result object (an instance of <pg95-result>), the number of tuples in the result, and the number of fields in each tuple (both <fixnum>s).
When the function returns, the C result object is cleared (freed?).