seek (PGlarge)

    /*
     * call-seq:
     *    lrg.seek( offset, whence )
     *
     * Move the large object pointer to the _offset_.
     * Valid values for _whence_ are +SEEK_SET+, +SEEK_CUR+, and +SEEK_END+.
     * (Or 0, 1, or 2.)
     */
    static VALUE
    pglarge_seek(obj, offset, whence)
        VALUE obj, offset, whence;
    {
        PGlarge *pglarge = get_pglarge(obj);
        int ret;

        if((ret = lo_lseek(pglarge->pgconn, pglarge->lo_fd, NUM2INT(offset), NUM2INT(whence))) == -1) {
            rb_raise(rb_ePGError, "error while moving cursor");
        }

        return INT2NUM(ret);
    }