original_string: public function fetch_from_cursor($cursorname) {
          $count = $this->get_fetch_buffer_size();
  
          $sql = 'FETCH ' . $count . ' FROM ' . $cursorname;
  
          $this->query_start($sql, [], SQL_QUERY_AUX);
          $result = pg_query($this->pgsql, $sql);
          $last = pg_num_rows($result) !== $count;
  
          $this->query_end($result);
  
          return [$result, $last];
      }
code: public function fetch_from_cursor($cursorname) {
          $count = $this->get_fetch_buffer_size();
  
          $sql = 'FETCH ' . $count . ' FROM ' . $cursorname;
  
          $this->query_start($sql, [], SQL_QUERY_AUX);
          $result = pg_query($this->pgsql, $sql);
          $last = pg_num_rows($result) !== $count;
  
          $this->query_end($result);
  
          return [$result, $last];
      }
code_tokens: public function fetch_from_cursor ( $ cursorname ) { $ count = $ this -> get_fetch_buffer_size ( ) ; $ sql = 'FETCH ' . $ count . ' FROM ' . $ cursorname ; $ this -> query_start ( $ sql , [ ] , SQL_QUERY_AUX ) ; $ result = pg_query ( $ this -> pgsql , $ sql ) ; $ last = pg_num_rows ( $ result ) !== $ count ; $ this -> query_end ( $ result ) ; return [ $ result , $ last ] ; }
docstring: Retrieves data from cursor. For use by recordset only; do not call directly.
  
  Return value contains the next batch of Postgres data, and a boolean indicating if this is
  definitely the last batch (if false, there may be more)
  
  @param string $cursorname Name of cursor to read from
  @return array Array with 2 elements (next data batch and boolean indicating last batch)
docstring_tokens: Retrieves data from cursor . For use by recordset only ; do not call directly .