def each_instance_by_sql(sql, options={}, &block)
        options = {:connection => self.connection}.merge(options)
        cursor  = PostgreSQLCursor::Cursor.new(sql, options)
        return cursor.each_instance(self, &block) if block_given?
        cursor.iterate_type(self)
      end
Public: Returns each row as a model instance to the given block
As this instantiates a model object, it is slower than each_row_by_sql

Paramaters: see each_row_by_sql

Example:
Post.each_instance_by_sql("select * from posts") { |post| post.process }
Post.each_instance_by_sql("select * from posts").count

Returns the number of rows yielded to the block