pike.git / lib / modules / Sql.pmod / pgsql_util.pmod

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:1549:    if (eoffound)    return 0;    array(array|int) datarow = datarows->try_read_array();    if (!sizeof(datarow)) {    array cid = setuptimeout();    PT(datarow = datarows->read_array());    local_backend->remove_call_out(cid);    }    if (arrayp(datarow[-1]))    return datarow; +  do datarow = datarow[..<1]; // Swallow EOF mark(s) +  while (sizeof(datarow) && !arrayp(datarow[-1]));    trydelayederror();    eoffound = 1;    datarows->write(1); // Signal EOF for other threads -  return (datarow = datarow[..<1]); +  return datarow;    }       //! @param copydata    //! When using COPY FROM STDIN, this method accepts a string or an    //! array of strings to be processed by the COPY command; when sending    //! the amount of data sent per call does not have to hit row or column    //! boundaries.    //!    //! The COPY FROM STDIN sequence needs to be completed by either    //! explicitly or implicitly destroying the result object, or by passing no