<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    On 12/13/11 11:40 AM, Paul Pankhurst wrote:
    <blockquote cite="mid:D3F2C658884F44B6882BA8DB016504E8@pjplaptop"
      type="cite">
      <div dir="ltr">
        <div style="font-family: 'Calibri'; color: rgb(0, 0, 0);
          font-size: 12pt;">
          <div>I am having problems with the db_fetch_next routine&nbsp; and
            Postgres.</div>
          <div>&nbsp;</div>
          <div>I can&#8217;t see any problem with my code that calls it, and
            as far as I can tell the problem appears to be in the
            db_postgres_fetch_result routine.</div>
          <div>On the first invocation of db_postgres_fetch_result&nbsp; it
            allocates a result structure and gives me the first 5 rows
            of the 198 that match my query after calling
            db_postgres_convert_rows.</div>
          <div>On the 2nd invocation it fails to retrieve the next 5
            rows because CON_RESULT(_con) is NULL !</div>
          <div>Anyone got any suggestions? </div>
        </div>
      </div>
    </blockquote>
    can you doublecheck and see if you don't call free_result() before
    fetching the next rows? If you run with debug=3, if there is a
    free_result, you should see the log message from:<br>
    <br>
    LM_DBG("PQclear(%p) result set\n", CON_RESULT(_con))<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a></pre>
  </body>
</html>