Skip to content
This repository has been archived by the owner on Jan 15, 2020. It is now read-only.

Commit

Permalink
Fix a few more places where postgres Oid was treated as a signed int
Browse files Browse the repository at this point in the history
  • Loading branch information
Mina Naguib committed Jul 16, 2014
1 parent 3fd2a4f commit cc8513a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ext/pg_result.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ pgresult_ftable(VALUE self, VALUE column_number)
rb_raise(rb_eArgError,"Invalid column index: %d", col_number);

n = PQftable(pgresult, col_number);
return INT2FIX(n);
return UINT2NUM(n);
}

/*
Expand Down Expand Up @@ -640,7 +640,7 @@ pgresult_paramtype(VALUE self, VALUE param_number)
PGresult *result;

result = pgresult_get(self);
return INT2FIX(PQparamtype(result,NUM2INT(param_number)));
return UINT2NUM(PQparamtype(result,NUM2INT(param_number)));
}

/*
Expand Down Expand Up @@ -693,7 +693,7 @@ pgresult_oid_value(VALUE self)
if (n == InvalidOid)
return Qnil;
else
return INT2FIX(n);
return UINT2NUM(n);
}

/* Utility methods not in libpq */
Expand Down

0 comments on commit cc8513a

Please sign in to comment.